Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/aphront/sink/AphrontPHPHTTPSink.php b/src/aphront/sink/AphrontPHPHTTPSink.php
index 2504aea037..4953b6e610 100644
--- a/src/aphront/sink/AphrontPHPHTTPSink.php
+++ b/src/aphront/sink/AphrontPHPHTTPSink.php
@@ -1,35 +1,36 @@
<?php
/**
* Concrete HTTP sink which uses "echo" and "header()" to emit data.
*/
final class AphrontPHPHTTPSink extends AphrontHTTPSink {
protected function emitHTTPStatus($code, $message = '') {
if ($code != 200) {
$header = "HTTP/1.0 {$code}";
if (strlen($message)) {
$header .= " {$message}";
}
header($header);
}
}
protected function emitHeader($name, $value) {
header("{$name}: {$value}", $replace = false);
}
protected function emitData($data) {
echo $data;
- // Try to push the data to the browser. This has a lot of caveats around
- // browser buffering and display behavior, but approximately works most
- // of the time.
- flush();
+ // NOTE: We don't call flush() here because it breaks HTTPS under Apache.
+ // See T7620 for discussion. Even without an explicit flush, PHP appears to
+ // have reasonable behavior here: the echo will block if internal buffers
+ // are full, and data will be sent to the client once enough of it has
+ // been buffered.
}
protected function isWritable() {
return !connection_aborted();
}
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Mar 16, 11:12 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
963553
Default Alt Text
(1 KB)

Event Timeline