httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apache-2.0/src/main http_protocol.c
Date Thu, 12 Oct 2000 04:18:24 GMT
rbb@locus.apache.org writes:

> rbb         00/10/11 20:57:45
> 
>   Modified:    src/main http_protocol.c
>   Log:
>   This is pretty much the wrong solution, but at least it makes POSTs work
>   again.  Chunking input doesn't work with this change, but that is because
>   this is a stop-gap to get POSTs working again.

Don't you want to hold onto remaining buckets between invocations?
Here is the set of changes I was soon to commit to get POSTs working
again :) 

Index: main/http_protocol.c
===================================================================
RCS file: /home/cvspublic/apache-2.0/src/main/http_protocol.c,v
retrieving revision 1.160
diff -u -r1.160 http_protocol.c
--- main/http_protocol.c        2000/10/12 02:54:38     1.160
+++ main/http_protocol.c        2000/10/12 04:18:32
@@ -2398,10 +2398,23 @@
     apr_status_t rv;
     apr_int32_t timeout;
 
+    if (!r->connection->input_data) {
+        /* XXX used only by ap_get_client_block(), lifetime is request;
+         * move from c to r and fix the pool
+         */
+        r->connection->input_data = ap_brigade_create(r->connection->pool);
+    }
 
     if (!r->read_chunked) {     /* Content-length read */
         ap_bucket *b;
         const char *tempbuf;
+
+        if (!r->remaining) {
+            /* We can't call http_filter() again to find out because when
+             * c->remaining is zero it returns lines of protocol data.
+             */
+            return 0;
+        }
 
         len_to_read = (r->remaining > bufsiz) ? bufsiz : r->remaining;


-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message