Handling responses with Content-Lenght: 0

This commit is contained in:
Dmitry Stogov 2005-05-23 06:25:16 +00:00
parent 25108c37ca
commit 1417cbaf30

View File

@ -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) {