cvs: pear /HTTP_Request Request.php

From: Date: Sun, 29 Sep 2002 14:20:40 +0000
Subject: cvs: pear /HTTP_Request Request.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-6752@lists.php.net to get a copy of this message
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@phpguru.org> | // +-----------------------------------------------------------------------+ // -// $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');

« previous php.pear.cvs (#6752) next »