13

Crazy... Hm, that could qualify for a *lot*.

Craziest. Probably misusage or rather "brain damaged" knowledge about HTTP.

I've seen a lot of wild things when devs start poking standards, but the tip of the iceberg was someone trying to use UTF-8 in headers...

You might have guessed it - German umlauts. :(

Coz yeah. Fucktard loved writing everything in german, so why not write custom header names in german.

The fun thing is: It *can* work, though the usual sane thing is to keep it in ASCII range for the obvious reason that using UTF-8 (or ISO-8859-1, which is *not* ASCII) is a gamble you gonna loose.

The fun game was that after putting in a much needed load balancer between services for monitoring / scaling etc suddenly *something* seemed off.

It took me 2 days and a lot of Wireshark hoola hooping to find out why, cause the header was used for device detection aka wether it's a bot or not. Or in the german term the dev used: "Geräte-Art".

As the fallback was to assume a bot, but only rate limit based on IP, only few managed to achieve the necessary rate limit to get blocked.

So when I say *something* seemed off, I really mean a spooky kind of "sometimes IP blocked for seemingly no reason at all".

Fun stuff. The dev btw germanized everything. Untangling the code base was a lot of non fun. -.-

Comments
  • 0
    Gotta encrypt the source code
  • 0
    @electrineer with a Chinese/Japanese key
  • 1
    Wow.

    Gotta admit, the balls of using that as a http header.

    I gotta admit have worked with native language values keys. it can sometimes help when there's some company specific term that's almost untranslatable.

    But no one I worked with would've dreamt of using it as a http header
  • 5
    @jiraTicket

    He had wonderful names.

    An Interface was a Kontrakt,
    an wrapper was a Huelse,
    an class was a Klasse,
    ...

    Yeah. The code base was a nightmare.
  • 1
    Oh, so just full on german translations everywhere, not just in unique cases.

    Just curious, that 'Geräte-Art' header - was that written plainly as something like SetHeader('Geräte-Art') or was it a case when he normally tried to asciify his german, but forgot since it was something like SetHeader(GetStuff())?
  • 1
    @jiraTicket nah. It was Set header(Geräte-Art)...

    We had an internal discussion later and many devs were baffled that UTF-8 isn't "common" in HTTP...

    But in his case, I must admit that I was happy that he left the company. Guy had more than a few nuts loose.
Add Comment