summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2010-10-05 11:43:59 +0000
committerDmitry Stogov <dmitry@php.net>2010-10-05 11:43:59 +0000
commit105f312e998adb45209e5c128961b4e99275525a (patch)
treea6559121eec8feafa255a9046884712e40919a5b
parentbe89f9d922b2b370bd74ae3bbb4bf5721f8eac34 (diff)
downloadphp-git-105f312e998adb45209e5c128961b4e99275525a.tar.gz
Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy with SoapClient object).
-rw-r--r--NEWS2
-rw-r--r--ext/soap/php_http.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 5d1478adc9..e6cebce1a3 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@
(Sriram Natarajan)
- Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle)
- Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
+- Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
+ with SoapClient object). (Dmitry)
22 Jul 2010, PHP 5.2.14
- Reverted bug fix #49521 (PDO fetchObject sets values before calling
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index 3797215393..87b8af694b 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -167,6 +167,13 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, in
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) {