diff options
| author | Dmitry Stogov <dmitry@php.net> | 2004-02-20 15:38:39 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2004-02-20 15:38:39 +0000 |
| commit | 8fc285275c7cf23fb69900a7cce5a09856bd46e9 (patch) | |
| tree | f98afa9389b448aaf4863da0782a83de1ad29a04 /ext/soap/php_http.c | |
| parent | 081fa78b084f617220b55d91334e9d1d98fc51fd (diff) | |
| download | php-git-8fc285275c7cf23fb69900a7cce5a09856bd46e9.tar.gz | |
BUGFIX: bug in HTTP chunked encoding was fixed
Diffstat (limited to 'ext/soap/php_http.c')
| -rw-r--r-- | ext/soap/php_http.c | 10 |
1 files 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; |
