diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-07-28 16:17:35 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-07-28 16:17:35 +0200 |
commit | cb0ff19dc4921a93f03b9c62934359968ec21b5b (patch) | |
tree | ce5eec39bce630d1f1190a0e31fa9c6ef0a2f26f | |
parent | 798ffd9d7c51182ff1bfb6c20e633babcb524176 (diff) | |
parent | 2c4e06d3259bd70122008c9c31d65af015fa1d96 (diff) | |
download | nextcloud-server-cb0ff19dc4921a93f03b9c62934359968ec21b5b.tar.gz nextcloud-server-cb0ff19dc4921a93f03b9c62934359968ec21b5b.zip |
Merge pull request #9924 from owncloud/eventsource-nginx-buffering
Prevent nginx from buffering event source events
-rw-r--r-- | lib/private/eventsource.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/eventsource.php b/lib/private/eventsource.php index 5a41ddd8b37..192c1446b5a 100644 --- a/lib/private/eventsource.php +++ b/lib/private/eventsource.php @@ -34,6 +34,7 @@ class OC_EventSource{ public function __construct() { OC_Util::obEnd(); header('Cache-Control: no-cache'); + header('X-Accel-Buffering: no'); $this->fallback=isset($_GET['fallback']) and $_GET['fallback']=='true'; if($this->fallback) { $this->fallBackId=$_GET['fallback_id']; @@ -44,6 +45,7 @@ class OC_EventSource{ } if( !OC_Util::isCallRegistered()) { $this->send('error', 'Possible CSRF attack. Connection will be closed.'); + $this->close(); exit(); } flush(); |