cvs: pear-core /PEAR Downloader.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Wed, 04 Mar 2009 15:48:58 +0000 |
| Subject: | cvs: pear-core /PEAR Downloader.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-8222@lists.php.net to get a copy of this message | ||
dufuz Wed Mar 4 15:48:58 2009 UTC
Modified files:
/pear-core/PEAR Downloader.php
Log:
Bug #14947 downloadHttp() is missing Host part of the HTTP Request when using Proxy [ifeghali]
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Downloader.php?r1=1.156&r2=1.157&diff_format=u
Index: pear-core/PEAR/Downloader.php
diff -u pear-core/PEAR/Downloader.php:1.156 pear-core/PEAR/Downloader.php:1.157
--- pear-core/PEAR/Downloader.php:1.156 Tue Feb 24 23:38:22 2009
+++ pear-core/PEAR/Downloader.php Wed Mar 4 15:48:58 2009
@@ -12,7 +12,7 @@
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: Downloader.php,v 1.156 2009/02/24 23:38:22 dufuz Exp $
+ * @version CVS: $Id: Downloader.php,v 1.157 2009/03/04 15:48:58 dufuz Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -1591,9 +1591,11 @@
}
if ($lastmodified === false || $lastmodified) {
- $request = "GET $url HTTP/1.1\r\n";
+ $request = "GET $url HTTP/1.1\r\n";
+ $request .= "Host: $host:$port\r\n";
} else {
- $request = "GET $url HTTP/1.0\r\n";
+ $request = "GET $url HTTP/1.0\r\n";
+ $request .= "Host: $host\r\n";
}
} else {
$network_host = $host;