ID:               44248
 Updated by:       sjo...@php.net
 Reported By:      jboffel at gmail dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         SOAP related
 Operating System: Linux RedHat Enterprise
 PHP Version:      5.2.9
 New Comment:

I misunderstood the problem. The request I posted was for HTTP, not for
HTTPS. For HTTPS, the Host header is indeed missing. I am not yet sure
that that is a bug.


Previous Comments:
------------------------------------------------------------------------

[2009-09-01 17:02:47] sjo...@php.net

Thank you for your bug report.

I could not reproduce your problem. It is possible it has already been
fixed in the meantime.

This is the request the SoapClient sends to the proxy server in my
setup:

POST http://ws1.webservices.nl:80/address/soap.php HTTP/1.1
Host: ws1.webservices.nl
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.11RC2-dev
Content-Type: text/xml; charset=utf-8
SOAPAction:
"http://ws1.webservices.nl/address/soap.php/addressReeksPostcodeSearch";
Content-Length: 552

<?xml version="1.0" encoding="UTF-8"?>... etc. etc.

Please reopen this bug if you still have this problem.

------------------------------------------------------------------------

[2009-06-16 08:15:35] garyxemily at hotmail dot co dot uk

gary the 4 ed mam is called jaki rolo she is the last dinosour in the
world if u see her phone the millatery :D

------------------------------------------------------------------------

[2009-05-02 12:10:19] jboffel at gmail dot com

sorry small mistake on my previous comment...
Good fix is:

smart_str_append_const(&soap_headers, "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");

------------------------------------------------------------------------

[2009-04-30 07:58:36] jboffel at gmail dot com

I'll even give you a link on another bug related to our problem :
http://bugs.php.net/bug.php?id=30359

This bug show us that "Host: " field was previously in the code (in
2004) and there was a bug on this field (about the port) which complet
my fix to avoid repeating his bug.

So apparently you need to add this code to be compliant to all RFC
requests:

smart_str_append_const(&soap_headers, "Host: ");
smart_str_appends(&soap_headers, phpurl->host);
smart_str_append_const(&soap_headers, "\r\n");
if (phpurl->port != 80) {
    smart_str_append_const(&soap_headers, ":");
    smart_str_append_unsigned(&soap_headers, phpurl->port);
}

------------------------------------------------------------------------

[2009-04-28 19:47:01] jboffel at gmail dot com

I checked source code of last CVS snapshot you gave with your link.

I can't easily test in same conditions than before so I just compared
source code.
I could be wrong but I'm pretty sure there is no difference and that
the bug is still present.

smart_str_append_const(&soap_headers, "CONNECT ");
smart_str_appends(&soap_headers, phpurl->host);
smart_str_appendc(&soap_headers, ':');
smart_str_append_unsigned(&soap_headers, phpurl->port);
smart_str_append_const(&soap_headers, " HTTP/1.1\r\n");
proxy_authentication(this_ptr, &soap_headers TSRMLS_CC);
smart_str_append_const(&soap_headers, "\r\n");

proxy_authentication just add basic auth if necessary. Nothing to do
with "Host: " header parameter.
And it's still in HTTP/1.1, so for me, no news.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/44248

-- 
Edit this bug report at http://bugs.php.net/?id=44248&edit=1

Reply via email to