From 8fc285275c7cf23fb69900a7cce5a09856bd46e9 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 20 Feb 2004 15:38:39 +0000 Subject: [PATCH] BUGFIX: bug in HTTP chunked encoding was fixed --- ext/soap/php_http.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 70a96fdd6c..137e50f715 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -662,11 +662,11 @@ static int get_http_body(php_stream *stream, char *headers, char **response, in while (!done) { int buf_size = 0; - php_stream_gets(stream, chunk_size, sizeof(chunk_size)); + php_stream_gets(stream, chunk_size, sizeof(chunk_size)); if (sscanf(chunk_size, "%x", &buf_size) > 0 ) { if (buf_size > 0) { int len_size = 0; - + http_buf = erealloc(http_buf, http_buf_size + buf_size + 1); while (len_size < buf_size) { @@ -677,14 +677,14 @@ static int get_http_body(php_stream *stream, char *headers, char **response, in break; } len_size += len_read; - http_buf_size += len_size; + http_buf_size += len_read; } } - + /* Eat up '\r' '\n' */ php_stream_getc(stream); php_stream_getc(stream); - } else { + } else { /* Somthing wrong in chunked encoding */ efree(http_buf); return FALSE; -- 2.50.1