From 419be435d01d8c7b04287ee3fc0ba3da906a6852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=BCttner?= Date: Tue, 4 Jul 2017 12:46:49 +0200 Subject: [PATCH] Closes #155, test for #156 Fixes #155 by disabeling the HTTP/1.1 100-Continuation mechanism (clearing the Expect-Header), which breaks with imcompatible servers for POST-requests larger than 1024B. Added explicit content accepted encoding for #156. This should resolve the issue. However, further testing on this is required. --- core/Files/AsyncHttpRequest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/Files/AsyncHttpRequest.php b/core/Files/AsyncHttpRequest.php index 0d960ce3..564038b4 100644 --- a/core/Files/AsyncHttpRequest.php +++ b/core/Files/AsyncHttpRequest.php @@ -72,6 +72,7 @@ class AsyncHttpRequest implements UsageInformationAble { array_push($this->headers, 'Keep-Alive: ' . $keepAlive); array_push($this->headers, 'Connection: Keep-Alive'); } + array_push($this->headers, 'Accept-Charset: utf-8'); $request = $this->newRequest($this->url, $this->timeout); $request->getOptions()->set(CURLOPT_AUTOREFERER, true)// accept link reference @@ -88,6 +89,8 @@ class AsyncHttpRequest implements UsageInformationAble { array_push($this->headers, 'Content-Type: ' . $this->contentType); array_push($this->headers, 'Keep-Alive: timeout=600, max=2000'); array_push($this->headers, 'Connection: Keep-Alive'); + array_push($this->headers, 'Expect:'); + array_push($this->headers, 'Accept-Charset: utf-8'); //$content = str_replace(array("\r", "\n"), '', $this->content); $content = $this->content; @@ -229,4 +232,4 @@ class AsyncHttpRequest implements UsageInformationAble { public function setTimeout($timeout) { $this->timeout = $timeout; } -} \ No newline at end of file +}