]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Buffer partial lines within ap_core_input_filter() when doing
authorBrian Pane <brianp@apache.org>
Sun, 22 Jan 2006 03:35:46 +0000 (03:35 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 22 Jan 2006 03:35:46 +0000 (03:35 +0000)
AP_MODE_GETLINE reads on a nonblocking connection

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-read-dev@371175 13f79535-47bb-0310-9956-ffa450edef68

server/core_filters.c

index 0c06b90c4197afc03d71b3682a894d42a489f544..2e18d6f082b03112a16d388b665c82ffe0a594e6 100644 (file)
@@ -153,12 +153,8 @@ int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
     if (mode == AP_MODE_GETLINE) {
         /* we are reading a single LF line, e.g. the HTTP headers */
         rv = apr_brigade_split_line(b, ctx->b, block, HUGE_STRING_LEN);
-        /* We should treat EAGAIN here the same as we do for EOF (brigade is
-         * empty).  We do this by returning whatever we have read.  This may
-         * or may not be bogus, but is consistent (for now) with EOF logic.
-         */
         if (APR_STATUS_IS_EAGAIN(rv)) {
-            rv = APR_SUCCESS;
+            APR_BRIGADE_PREPEND(ctx->b, b);
         }
         return rv;
     }