mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Handling responses with Content-Lenght: 0
This commit is contained in:
parent
25108c37ca
commit
1417cbaf30
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user