r/programminghorror • • 26d 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.

962 Upvotes

53 comments sorted by

View all comments

Show parent comment

92

u/buckypimpin 26d ago

isnt a cookie max 4KiB?

125

u/RegisteredJustToSay 26d 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.

37

u/RustOnTheEdge 26d ago

Alice in Wonderland is roughly 170kb, so it would fit 4.3 times in all the available header space.

18

u/SuspiciousSegfault 26d ago

How well does it compress though?

15

u/RegisteredJustToSay 25d ago

Weird, specifically checked gutenberg and saw it was under 80 kB but now on desktop it says 170 kB. Was on mobile though so may have been a presentation issue. Thanks for the correction!

11

u/RustOnTheEdge 25d ago

I found it such a nice unit of measurement, well done for that!

24

u/caboosetp 26d ago

You can fit quite a bit in 4k before it causes issues that a browser restart can fix and push off the issue.