Hacker News new | ask | show | jobs
by pragnesh 2377 days ago
"accept-encoding: gzip" header is request header. why it is present in unoptimized response in first place ?
1 comments

It was added as part of a bug fix five years ago: the server was looking at the Content-Type request header instead of Content-Encoding to determine whether the incoming payload was compressed. Not sure why the Accept-Encoding response header was added as the same time, but it went undetected since it didn't cause any problems (apart from costing money).