diff options
| author | Dmitry Stogov <dmitry@php.net> | 2006-03-20 10:37:09 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2006-03-20 10:37:09 +0000 |
| commit | 323a2d30ed517881887afacd7b0e466485bdccbf (patch) | |
| tree | f953acf833079eb3d2dd89121d28d51f67730b7f /ext/soap/php_http.c | |
| parent | 00c81b0e494914805f4a06692bf2654ed9bab0b6 (diff) | |
| download | php-git-323a2d30ed517881887afacd7b0e466485bdccbf.tar.gz | |
Fixed bug #36749 (SOAP: 'Error Fetching http body' when using HTTP Proxy)
Diffstat (limited to 'ext/soap/php_http.c')
| -rw-r--r-- | ext/soap/php_http.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 1652853bcf..cb7622fdff 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -811,7 +811,22 @@ try_again: efree(cookie); } - if (!get_http_body(stream, !http_1_1, http_headers, &http_body, &http_body_size TSRMLS_CC)) { + if (http_1_1) { + http_close = FALSE; + if (use_proxy && !use_ssl) { + connection = get_http_header_value(http_headers,"Proxy-Connection: "); + if (connection) { + if (strncasecmp(connection, "close", sizeof("close")-1) == 0) { + http_close = TRUE; + } + efree(connection); + } + } + } else { + http_close = TRUE; + } + + if (!get_http_body(stream, http_close, http_headers, &http_body, &http_body_size TSRMLS_CC)) { if (request != buf) {efree(request);} php_stream_close(stream); efree(http_headers); |
