ID: 44248 User updated by: jboffel at gmail dot com Reported By: jboffel at gmail dot com -Status: Open +Status: Bogus Bug Type: SOAP related Operating System: Linux RedHat Enterprise PHP Version: 5.2.9 New Comment:
Hi, Thanks for your test, but you have to do it through HTTPS connection to reproduce the bug. In fact, the bug is linked to the use of an Apache proxy through HTTPS connection and a SOAP call. If you connect through HTTP you don't do the CONNECT command and you can't see the bug. Previous Comments: ------------------------------------------------------------------------ [2009-09-01 17:11:14] sjo...@php.net 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. ------------------------------------------------------------------------ [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); } ------------------------------------------------------------------------ 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