From: Dmitry Stogov Date: Mon, 23 May 2005 06:25:02 +0000 (+0000) Subject: Handling responses with Content-Lenght: 0 X-Git-Tag: php-5.0.5RC1~258 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16a1587e08ddf8b88c0eb839282e4df1270184a7;p=php Handling responses with Content-Lenght: 0 --- diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 9b3c21cc15..0b15f85d9c 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -1129,6 +1129,14 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r if (header) { header_length = atoi(header); efree(header); + if (!header_length && !header_chunked) { + /* Empty response */ + http_buf = emalloc(1); + http_buf[0] = '\0'; + (*response) = http_buf; + (*out_size) = 0; + return TRUE; + } } if (header_chunked) {