Fixed bug #48216 (PHP Fatal error: SOAP-ERROR: Parsing WSDL: Extra content at the end of the doc, when server uses chunked transfer encoding with spaces after chunk size)

This commit is contained in:
Dmitry Stogov 2011-11-23 10:49:42 +00:00
parent bafdf84528
commit b3522ffdcb

View file

@ -1897,7 +1897,6 @@ php_stream_filter_factory consumed_filter_factory = {
typedef enum _php_chunked_filter_state { typedef enum _php_chunked_filter_state {
CHUNK_SIZE_START, CHUNK_SIZE_START,
CHUNK_SIZE, CHUNK_SIZE,
CHUNK_SIZE_EXT_START,
CHUNK_SIZE_EXT, CHUNK_SIZE_EXT,
CHUNK_SIZE_CR, CHUNK_SIZE_CR,
CHUNK_SIZE_LF, CHUNK_SIZE_LF,
@ -1937,7 +1936,7 @@ static int php_dechunk(char *buf, int len, php_chunked_filter_data *data)
data->state = CHUNK_ERROR; data->state = CHUNK_ERROR;
break; break;
} else { } else {
data->state = CHUNK_SIZE_EXT_START; data->state = CHUNK_SIZE_EXT;
break; break;
} }
data->state = CHUNK_SIZE; data->state = CHUNK_SIZE;
@ -1948,13 +1947,6 @@ static int php_dechunk(char *buf, int len, php_chunked_filter_data *data)
} else if (p == end) { } else if (p == end) {
return out_len; return out_len;
} }
case CHUNK_SIZE_EXT_START:
if (*p == ';'|| *p == '\r' || *p == '\n') {
data->state = CHUNK_SIZE_EXT;
} else {
data->state = CHUNK_ERROR;
continue;
}
case CHUNK_SIZE_EXT: case CHUNK_SIZE_EXT:
/* skip extension */ /* skip extension */
while (p < end && *p != '\r' && *p != '\n') { while (p < end && *p != '\r' && *p != '\n') {