From 5ecc194ebf2bf203fdc3fdd6e02cb3b371550156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 29 Aug 2016 11:27:12 +0200 Subject: [PATCH] Fix headers handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/Util.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/Util.php b/libraries/Util.php index 0cbc53e2d8..0769faae7d 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -4901,12 +4901,12 @@ class Util /** * Creates HTTP request * - * @param string $url Url to send the request - * @param string $method HTTP request method (GET, POST, PUT, DELETE, etc) - * @param int $connection_timeout Timeout seconds for the HTTP request - * @param bool $return_only_status If set to true, the method would only return response status - * @param mixed $content Content to be sent with HTTP request - * @param string $header Header to be set for the HTTP request + * @param string $url Url to send the request + * @param string $method HTTP request method (GET, POST, PUT, DELETE, etc) + * @param int $connection_timeout Timeout seconds for the HTTP request + * @param bool $return_only_status If set to true, the method would only return response status + * @param mixed $content Content to be sent with HTTP request + * @param string $header Header to be set for the HTTP request * * @return mixed */ @@ -4923,7 +4923,7 @@ class Util curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, $method); } if ($header) { - curl_setopt($curl_handle, CURLOPT_HTTPHEADER,array('Expect:', $header)); + curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array($header)); curl_setopt($curl_handle, CURLOPT_HEADER, true); } @@ -4965,7 +4965,7 @@ class Util ) ); if ($header) { - $context['http']['header'] .= "\nExpect: ". $header; + $context['http']['header'] .= "\n" . $header; } if ($method == "POST") { $context['http']['content'] = $content;