1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 20:10:55 +01:00

Fix horrible broken mess in 304 handling

Summary:
Sending a response body in a 304 triggers some crazy broken behavior in Safari +
Apache that I never hit during testing. Be spec-compliant.

Test Plan:
Mashed reload a bunch on a .php page with Safari + Apache against localhost.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran, rm
CC: aran, tuomaspelkonen
Differential Revision: 261
This commit is contained in:
epriestley 2011-05-10 16:08:20 -07:00
parent f7e2b03077
commit 80698aba6f

View file

@ -26,7 +26,10 @@ class Aphront304Response extends AphrontResponse {
}
public function buildResponseString() {
return '304 Not Modified';
// IMPORTANT! According to the HTTP/1.1 spec (RFC 2616) a 304 response
// "MUST NOT" have any content. Apache + Safari strongly agree, and
// completely flip out and you start getting 304s for no-cache pages.
return null;
}
}