]> granicus.if.org Git - apache/commitdiff
Adds support for reading trailers on input by exporting get_mime_headers
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 16 Apr 2002 05:43:09 +0000 (05:43 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 16 Apr 2002 05:43:09 +0000 (05:43 +0000)
to ap_get_mime_headers and calling it in the appropriate place in
ap_http_filter.

showstoppers--;

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

CHANGES
STATUS
include/http_protocol.h
modules/http/http_protocol.c
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 8e72a5232e96b22ca8a74f6fbad849bea96f32ca..ce1ba2cec54efe4a10820d5fc9a5ae14babdec69 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.36
 
+  *) Add HTTP chunked input trailer support.  [Justin Erenkrantz]
+
+  *) Rename and export get_mime_headers as ap_get_mime_headers.
+     [Justin Erenkrantz]
+
   *) Allow empty Host: header arguments.  PR 7441.  [Justin Erenkrantz]
 
   *) Properly substitute sbindir as httpd's location in apachectl.  PR 7840.
diff --git a/STATUS b/STATUS
index 072563f6a983bd397f0b80cf930a08560fdd4f53..127b2fdb4e77cf4047910a6e342eecb328d512d5 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2002/04/13 00:50:20 $]
+Last modified at [$Date: 2002/04/16 05:43:08 $]
 
 Release:
 
@@ -52,8 +52,6 @@ RELEASE SHOWSTOPPERS:
     * Daedalus segfaults with 2.0.35
       Greg and Cliff are working on this.
 
-    * HTTP chunk reads fail to read the trailers.
-
 CURRENT VOTES:
 
     * Should we always build [support*] binaries statically unless otherwise
index 5ad071fa8f2cf3a722cfb19f6976bc7437cece78..28402a1216dd50701e3191767d94411251a041a3 100644 (file)
@@ -91,6 +91,12 @@ AP_DECLARE_DATA extern ap_filter_rec_t *ap_old_write_func;
  */ 
 request_rec *ap_read_request(conn_rec *c);
 
+/**
+ * Read the mime-encoded headers.
+ * @param r The current request
+ */
+void ap_get_mime_headers(request_rec *r);
+
 /* Finish up stuff after a request */
 
 /**
index 119dbfaa8ab640c02b2b17710afea76457a70027..f79c0f0773adea5f1f3c7e4f05e8749831ef603b 100644 (file)
@@ -766,7 +766,8 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                 ctx->remaining = get_chunk_size(line);
 
                 if (!ctx->remaining) {
-                    /* Handle trailers by calling get_mime_headers again! */
+                    /* Handle trailers by calling ap_get_mime_headers again! */
+                    ap_get_mime_headers(f->r);
                     e = apr_bucket_eos_create(c->bucket_alloc);
                     APR_BRIGADE_INSERT_TAIL(b, e);
                     return APR_SUCCESS;
index 5ec855ec079389d17c70cbb7dda7d6b19ddd367c..01cbb1a7c66e6ca0f7b87a4fc4ccb5e381c1a295 100644 (file)
@@ -716,7 +716,7 @@ static int read_request_line(request_rec *r)
     return 1;
 }
 
-static void get_mime_headers(request_rec *r)
+void ap_get_mime_headers(request_rec *r)
 {
     char* field;
     char *value;
@@ -856,7 +856,7 @@ request_rec *ap_read_request(conn_rec *conn)
     }
 
     if (!r->assbackwards) {
-        get_mime_headers(r);
+        ap_get_mime_headers(r);
         if (r->status != HTTP_REQUEST_TIME_OUT) {
             ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
                           "request failed: error reading the headers");