]> granicus.if.org Git - apache/commitdiff
return the actual number of bytes read when we're in "read a line" mode and it
authorGreg Ames <gregames@apache.org>
Wed, 31 Oct 2001 20:18:56 +0000 (20:18 +0000)
committerGreg Ames <gregames@apache.org>
Wed, 31 Oct 2001 20:18:56 +0000 (20:18 +0000)
looks like the line may never end.

This lets ap_getline determine whether there's excessive bytes or not,
depending on the size of its caller's buffers.  If the buffer can accomodate
more bytes, ap_getline will continue to read.

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

server/core.c

index dbcddafc8ce629675c28454f109d34ee2600dd69..36c207079afd34a07eeb5c4218d0a58ba743dd35 100644 (file)
@@ -2939,7 +2939,7 @@ static int core_input_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mod
         /* We didn't find an APR_ASCII_LF within the predefined maximum
          * line length. */
         if (len >= HUGE_STRING_LEN) {
-            return -1;
+            return len;
         }
     }