Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/sink/AphrontPHPHTTPSink.php
| <?php | <?php | ||||
| /** | /** | ||||
| * Concrete HTTP sink which uses "echo" and "header()" to emit data. | * Concrete HTTP sink which uses "echo" and "header()" to emit data. | ||||
| * | |||||
| * @group aphront | |||||
| */ | */ | ||||
| final class AphrontPHPHTTPSink extends AphrontHTTPSink { | final class AphrontPHPHTTPSink extends AphrontHTTPSink { | ||||
| protected function emitHTTPStatus($code, $message = '') { | protected function emitHTTPStatus($code, $message = '') { | ||||
| if ($code != 200) { | if ($code != 200) { | ||||
| $header = "HTTP/1.0 {$code}"; | $header = "HTTP/1.0 {$code}"; | ||||
| if (strlen($message)) { | if (strlen($message)) { | ||||
| $header .= " {$message}"; | $header .= " {$message}"; | ||||
| Show All 14 Lines | |||||