]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
core_input_filter():
authorJeff Trawick <trawick@apache.org>
Tue, 10 Oct 2000 02:10:42 +0000 (02:10 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 10 Oct 2000 02:10:42 +0000 (02:10 +0000)
  remove old code which looked for LF
  return apr_status_t value instead of length

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

modules/http/http_core.c

index 56c084471e6f2904875ba7bbca80bdb6c6011ace..2aeddff363a70241c5d3a910f2b3d99e638d0886 100644 (file)
@@ -3305,12 +3305,8 @@ static apr_status_t chunk_filter(ap_filter_t *f, ap_bucket_brigade *b)
 
 static int core_input_filter(ap_filter_t *f, ap_bucket_brigade *b)
 {
-/* XXX this needs to be moved to a common header file, but this is an ugly
- * hack just for today.
- */
-#define ASCII_LF '\012'
     char *buff;
-    apr_ssize_t length = HUGE_STRING_LEN, templen = 0;
+    apr_ssize_t length = HUGE_STRING_LEN;
     apr_socket_t *csock = NULL;
     apr_status_t rv;
     ap_bucket *e;
@@ -3322,17 +3318,11 @@ static int core_input_filter(ap_filter_t *f, ap_bucket_brigade *b)
     rv = apr_recv(csock, buff, &length);
     if (rv == APR_SUCCESS) {
         if (length > 0) {
-            templen = length - 1;
-            while (buff[templen] != ASCII_LF) {
-                rv = apr_recv(csock, buff + templen + 1, &length);
-                templen += length;
-            }
-                 
             /* This should probably be a pool bucket, but using a transient is 
              * actually okay here too.  We know the pool we are using will always 
              * be available as long as the connection is open.
              */
-            e = ap_bucket_create_transient(buff, templen + 1);
+            e = ap_bucket_create_transient(buff, length);
             AP_BRIGADE_INSERT_TAIL(b, e);
         }
         else {
@@ -3342,11 +3332,9 @@ static int core_input_filter(ap_filter_t *f, ap_bucket_brigade *b)
         }
     }
     else {
-        /* XXX need to trigger error processing */
-        /* leave the brigade empty for now; return error code
-         * in the future */
+        return rv;
     }
-    return templen;
+    return APR_SUCCESS;
 }
 /* Default filter.  This filter should almost always be used.  Its only job
  * is to send the headers if they haven't already been sent, and then send