From b5f0a54eacb6a7208c3e5e4146f1c3396ec4ba3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 28 Mar 2010 21:24:39 +0000 Subject: [PATCH] HTTP/1.1 does allow chunked content, but our script does not support it (yet) --- inc/functions.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index b21b98e90a..0187e2c818 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1782,11 +1782,9 @@ function sendGetRequest ($script, $data = array()) { } else { $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('VERSION') . getConfig('HTTP_EOL'); } - $request .= 'Accept: text/plain;q=0.8' . getConfig('HTTP_EOL'); + $request .= 'Accept: image/png,image/*;q=0.8,text/plain,text/html,*/*;q=0.5' . getConfig('HTTP_EOL'); $request .= 'Accept-Charset: UTF-8,*' . getConfig('HTTP_EOL'); - $request .= 'Cache-Control: no-cache' . getConfig('HTTP_EOL'); - $request .= 'Content-Type: text/plain' . getConfig('HTTP_EOL'); - $request .= 'Content-Length: 0' . getConfig('HTTP_EOL'); + $request .= 'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0' . getConfig('HTTP_EOL'); $request .= 'Connection: close' . getConfig('HTTP_EOL'); $request .= getConfig('HTTP_EOL'); @@ -1813,7 +1811,7 @@ function sendPostRequest ($script, $postData) { $body = http_build_query($postData, '', '&'); // Generate POST request header - $request = 'POST /' . trim($script) . ' HTTP/1.1' . getConfig('HTTP_EOL'); + $request = 'POST /' . trim($script) . ' HTTP/1.0' . getConfig('HTTP_EOL'); $request .= 'Host: ' . $host . getConfig('HTTP_EOL'); $request .= 'Referer: ' . getConfig('URL') . '/admin.php' . getConfig('HTTP_EOL'); $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL'); @@ -1990,7 +1988,7 @@ function setupProxyTunnel ($host, $resource) { $response = array('', '', ''); // Generate CONNECT request header - $proxyTunnel = 'CONNECT ' . $host . ':80 HTTP/1.1' . getConfig('HTTP_EOL'); + $proxyTunnel = 'CONNECT ' . $host . ':80 HTTP/1.0' . getConfig('HTTP_EOL'); $proxyTunnel .= 'Host: ' . $host . getConfig('HTTP_EOL'); // Use login data to proxy? (username at least!) -- 2.39.5