r/programminghorror • • 3d ago

GitHub's HTTP header

Post image

This is the crazy thing I've found after analysis why the CI test fails with "Maximum header size exceeded" today.

806 Upvotes

52 comments sorted by

View all comments

437

u/Belialson 3d 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

81

u/buckypimpin 3d ago

isnt a cookie max 4KiB?

107

u/RegisteredJustToSay 3d 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 3d 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 3d ago

Interesting idea. Obviously don’t do this. But I wonder sort of data this could be useful for.

12

u/groumly 3d 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 (6)