logo       

cvs: pear /HTTP_Request Request.php: msg#00655

php.cvs.pear

Subject: cvs: pear /HTTP_Request Request.php

richard Sun Sep 29 10:20:40 2002 EDT

Modified files:
/pear/HTTP_Request Request.php
Log:
Added port support to Host: header. Patch from Shane Caraveo


Index: pear/HTTP_Request/Request.php
diff -u pear/HTTP_Request/Request.php:1.16 pear/HTTP_Request/Request.php:1.17
--- pear/HTTP_Request/Request.php:1.16 Thu Sep 26 08:18:27 2002
+++ pear/HTTP_Request/Request.php Sun Sep 29 10:20:40 2002
@@ -32,7 +32,7 @@
// | Author: Richard Heyes <richard@xxxxxxxxxxx> |
// +-----------------------------------------------------------------------+
//
-// $Id: Request.php,v 1.16 2002/09/26 12:18:27 richard Exp $
+// $Id: Request.php,v 1.17 2002/09/29 14:20:40 richard Exp $
//
// HTTP_Request Class
//
@@ -44,7 +44,7 @@
//

require_once('Net/Socket.php');
-require_once('Net/URL.php');
+require_once('../../Net_URL/URL.php');

define('HTTP_REQUEST_METHOD_GET', 'GET', true);
define('HTTP_REQUEST_METHOD_HEAD', 'HEAD', true);
@@ -189,7 +189,8 @@

// Host header
if (HTTP_REQUEST_HTTP_VER_1_1 == $this->_http) {
- $this->addHeader('Host', $this->_url->host);
+ $host = $this->_url->host . ($this->_url->port != 80 ?
':' . $this->_url->port : '');
+ $this->addHeader('Host', $host);

if (extension_loaded('zlib')) {
$this->addHeader('Accept-Encoding', 'gzip');



--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise