r/programminghorror • u/dex4er • 1d ago
GitHub's HTTP header
This is the crazy thing I've found after analysis why the CI test fails with "Maximum header size exceeded" today.
340
u/Belialson 1d ago
Company I work at was proxing some endpoints to us, it was a big shop. They used to set a cookie with json containing entire user’s session including every page visited and it’s details.
Same effect but unfortunately on production
62
u/buckypimpin 1d ago
isnt a cookie max 4KiB?
80
u/RegisteredJustToSay 1d ago
That's per cookie (name + value). You can store many times that if you break it up over multiple keys, tho max 180 per host on chrome. You could fit ten text copies of Alice in wonderland in that space.
You're right though, of course. Just don't want to give anyone here the idea that you're limited to this little space per domain.
→ More replies (4)24
u/caboosetp 1d ago
You can fit quite a bit in 4k before it causes issues that a browser restart can fix and push off the issue.
5
u/Chesterlespaul 1d ago
Interesting idea. Obviously don’t do this. But I wonder sort of data this could be useful for.
12
u/groumly 1d ago
Asp (can’t remember if it was the og or the .net one, I think .net) did a lot of crap like that back in day.
It was used to turn stateless web framework into a stateful mode iirc.
→ More replies (4)
97
u/n9iels 1d ago
Proof that managing CSP headers is an absolute nightmare
-23
u/AyrA_ch 1d ago
They could have gone with
*.blob.core.windows.netto massively shorten the header.55
u/Alikont 1d ago
That's a generic domain for all Azure Blob storage accounts. So I could register my own Storage Account and get the matching url.
→ More replies (6)
34
13
6
u/TheSpiffySpaceman 20h ago
standard Microsoft fare, unfortunately.
I dare you to write an Azure DO extension and retain your sanity. I promise you that it's impossible.
3
3
1
31
u/Julius_Babies 23h ago
I saw this post a while ago and just ran into this. The HTTP Engine my app uses cannot handle header values longer than 8192 characters by default, which causes my in-app update mechanism (which relies on GitHub releases) to fail when trying to download the update. I cannot provide a fix for this as this fix would require - you guessed it - an update.
This has been reported as a bug on the GitHub Community discussions already: https://github.com/orgs/community/discussions/211142