summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mod_proxy_backend_http.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_proxy_backend_http.c b/src/mod_proxy_backend_http.c
index 5bda0658..a56bd602 100644
--- a/src/mod_proxy_backend_http.c
+++ b/src/mod_proxy_backend_http.c
@@ -144,11 +144,11 @@ static handler_t proxy_http_parse_chunked_stream(server *srv, proxy_session *ses
in->bytes_out += (offset - c->offset);
c->offset = offset;
}
+ if ( (size_t)offset == c->mem->used - 1) {
+ break; /* get next chunk from queue */
+ }
+ /* now ch is the last character, and it wasn't an xdigit */
if (!(ch == ' ' || ch == '\r' || ch == ';')) {
- if (ch == '\0') {
- /* get next chunk from queue */
- break;
- }
/* protocol error. bad http-chunk len */
return HANDLER_ERROR;
}