=================================================================== RCS file: /home/cvspublic/apache-1.3/src/modules/proxy/proxy_http.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -r1.106 -r1.107 --- apache-1.3/src/modules/proxy/proxy_http.c 2004/03/29 17:47:15 1.106 +++ apache-1.3/src/modules/proxy/proxy_http.c 2004/06/11 07:54:38 1.107 @@ -485,6 +485,13 @@ content_length = ap_table_get(resp_hdrs, "Content-Length"); if (content_length != NULL) { c->len = ap_strtol(content_length, NULL, 10); + + if (c->len < 0) { + ap_kill_timeout(r); + return ap_proxyerror(r, HTTP_BAD_GATEWAY, ap_pstrcat(r->pool, + "Invalid Content-Length from remote server", + NULL)); + } } }