]> granicus.if.org Git - php/commitdiff
Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy with SoapCl...
authorDmitry Stogov <dmitry@php.net>
Tue, 5 Oct 2010 11:43:59 +0000 (11:43 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 5 Oct 2010 11:43:59 +0000 (11:43 +0000)
ext/soap/php_http.c

index f01a4541d0e61f7114599ddd2e547ce9a6e93407..e20b7b67f8d2ef42a370dd94702102f65cbd5373 100644 (file)
@@ -137,6 +137,13 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, ph
                smart_str_appendc(&soap_headers, ':');
                smart_str_append_unsigned(&soap_headers, phpurl->port);
                smart_str_append_const(&soap_headers, " HTTP/1.1\r\n");
+               smart_str_append_const(&soap_headers, "Host: ");
+               smart_str_appends(&soap_headers, phpurl->host);
+               if (phpurl->port != 80) {
+                       smart_str_appendc(&soap_headers, ':');
+                       smart_str_append_unsigned(&soap_headers, phpurl->port);
+               }
+               smart_str_append_const(&soap_headers, "\r\n");
                proxy_authentication(this_ptr, &soap_headers TSRMLS_CC);
                smart_str_append_const(&soap_headers, "\r\n");
                if (php_stream_write(stream, soap_headers.c, soap_headers.len) != soap_headers.len) {