|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-10-08 10:59 UTC] sylvain dot pasche at camptocamp dot com
Description:
------------
according to the HTTP 1.1 RFC, section 14.23:
" A "host" without any trailing port information implies the default port for the service requested (e.g., "80" for an HTTP URL). "
This patch seems to corrects this:
--- php_http.c.orig 2004-10-08 10:46:50.000000000 +0200
+++ php_http.c 2004-10-08 10:44:10.000000000 +0200
@@ -382,6 +382,12 @@
smart_str_append_const(&soap_headers, " HTTP/1.1\r\n"
"Host: ");
smart_str_appends(&soap_headers, phpurl->host);
+
+ if (phpurl->port != 80) {
+ smart_str_append_const(&soap_headers, ":");
+ smart_str_append_unsigned(&soap_headers, phpurl->port);
+ }
+
smart_str_append_const(&soap_headers, "\r\n"
"Connection: Keep-Alive\r\n"
/*
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
I am experiencing this problem trying to connect to a SOAP service on port 8080 and 8880 (both NOT port 80). PHP can fetch the WSDL perfectly fine (constructor: new SoapClient("http://hostname:8080/path/to/Service?wsdl")) but all SOAP requests go to hostname:80. I have used ethereal to watch the HTTP traffic, and the resulting WSDL specifies the correct host and port, but PHP soap client doesn't seem to use it. I have not tried the patch specified with this bug though.