Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/response/Aphront304Response.php
| <?php | <?php | ||||
| /** | |||||
| * @group aphront | |||||
| */ | |||||
| final class Aphront304Response extends AphrontResponse { | final class Aphront304Response extends AphrontResponse { | ||||
| public function getHTTPResponseCode() { | public function getHTTPResponseCode() { | ||||
| return 304; | return 304; | ||||
| } | } | ||||
| public function buildResponseString() { | public function buildResponseString() { | ||||
| // IMPORTANT! According to the HTTP/1.1 spec (RFC 2616) a 304 response | // IMPORTANT! According to the HTTP/1.1 spec (RFC 2616) a 304 response | ||||
| // "MUST NOT" have any content. Apache + Safari strongly agree, and | // "MUST NOT" have any content. Apache + Safari strongly agree, and | ||||
| // completely flip out and you start getting 304s for no-cache pages. | // completely flip out and you start getting 304s for no-cache pages. | ||||
| return null; | return null; | ||||
| } | } | ||||
| } | } | ||||