php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21739 remote port number not sent in host header
Submitted: 2003-01-18 21:15 UTC Modified: 2003-04-29 09:12 UTC
From: warren at konkel dot net Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.3.0 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
16 + 9 = ?
Subscribe to this entry?

 
 [2003-01-18 21:15 UTC] warren at konkel dot net
I noticed that when giving WSDL the URL of a dynamically generated WSDL (such as Java's tomcat web services server), the server was returning a port number of 80 rather than 8080... I looked into and found out that the request sent to the server doesn't include the remote port... this fixed it:


on line 191 of HTTP/Request.php, currently there is: 
  
------------------------------------------------------
if (HTTP_REQUEST_HTTP_VER_1_1 == $this->_http) {  
    $this->addHeader('Host', $this->_url->host); 
} 
------------------------------------------------------

it SHOULD be: 

------------------------------------------------------
if (HTTP_REQUEST_HTTP_VER_1_1 == $this->_http) {  
    if ($this->_url->port) {  
        $this->addHeader('Host', $this->_url->host . ":" . $this->_url->port);  
    } else {  
        $this->addHeader('Host', $this->_url->host);  
    }  
}
------------------------------------------------------

-Warren

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-29 09:12 UTC] jellybob@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC