]> granicus.if.org Git - apache/commitdiff
* modules/http/http_protocol.c (ap_http_filter): Always fail if the
authorJoe Orton <jorton@apache.org>
Wed, 29 Sep 2004 14:38:42 +0000 (14:38 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 29 Sep 2004 14:38:42 +0000 (14:38 +0000)
Content-Length header is an empty string; previously this was only
an error with some strto* implementations.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105341 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index a69609a2239ab62d1ecb0152fc53673e9fcccb74..27fecaa14b646ec5b7da30c4a26be53ff4f2bdb1 100644 (file)
@@ -773,7 +773,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
              * string (excluding leading space) (the endstr checks)
              * and a negative number. */
             if (apr_strtoff(&ctx->remaining, lenp, &endstr, 10)
-                || *endstr || ctx->remaining < 0) {
+                || endstr == lenp || *endstr || ctx->remaining < 0) {
                 apr_bucket_brigade *bb;
 
                 ctx->remaining = 0;