httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r583194 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/proxy/mod_proxy_http.c
Date Tue, 09 Oct 2007 15:26:42 GMT
Author: niq
Date: Tue Oct  9 08:26:41 2007
New Revision: 583194

URL: http://svn.apache.org/viewvc?rev=583194&view=rev
Log:
mod_proxy_http: Correctly parse all Connection headers in proxy.
PR 43509

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=583194&r1=583193&r2=583194&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue Oct  9 08:26:41 2007
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.7
 
+  *) mod_proxy_http: Correctly parse all Connection headers in proxy.
+     PR 43509 [Nick Kew]
+
   *) mod_proxy_http: add Via header correctly (if enabled) to
      response, even where other Via headers exist.
      PR 19439 [Nick Kew]

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=583194&r1=583193&r2=583194&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Tue Oct  9 08:26:41 2007
@@ -79,18 +79,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_proxy_http: Correctly parse all Connection headers in proxy.
-     PR 43509
-     trunk: http://svn.apache.org/viewvc?view=rev&revision=580457
-     2.2.x: http://people.apache.org/~niq/43509.patch
-     +1: niq, rpluem
-     niq: changed the name.  Resisted temptation to use "pooltabletime".
-     rpluem says: Revision of name change is r581030.
-     -1: jim. r580457 and r581030 conflict. Likely because of
-              r580782
-     niq: separate 2.2.x patch fixes jim's objection
-     +1: jim
-
    * mod_proxy_http: Remove Warning headers with wrong date
      PR 16138
      trunk: http://svn.apache.org/viewvc?view=rev&revision=580782

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c?rev=583194&r1=583193&r2=583194&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c Tue Oct  9 08:26:41 2007
@@ -98,29 +98,37 @@
 }
 
 /* Clear all connection-based headers from the incoming headers table */
-static void ap_proxy_clear_connection(apr_pool_t *p, apr_table_t *headers)
+typedef struct header_dptr {
+    apr_pool_t *pool;
+    apr_table_t *table;
+} header_dptr;
+static int clear_conn_headers(void *data, const char *key, const char *val)
 {
+    apr_table_t *headers = ((header_dptr*)data)->table;
+    apr_pool_t *pool = ((header_dptr*)data)->pool;
     const char *name;
-    char *next = apr_pstrdup(p, apr_table_get(headers, "Connection"));
-
-    apr_table_unset(headers, "Proxy-Connection");
-    if (!next)
-        return;
-
+    char *next = apr_pstrdup(pool, val);
     while (*next) {
         name = next;
         while (*next && !apr_isspace(*next) && (*next != ',')) {
             ++next;
         }
         while (*next && (apr_isspace(*next) || (*next == ','))) {
-            *next = '\0';
-            ++next;
+            *next++ = '\0';
         }
         apr_table_unset(headers, name);
     }
+    return 1;
+}
+static void ap_proxy_clear_connection(apr_pool_t *p, apr_table_t *headers)
+{
+    header_dptr x;
+    x.pool = p;
+    x.table = headers;
+    apr_table_unset(headers, "Proxy-Connection");
+    apr_table_do(clear_conn_headers, &x, headers, "Connection", NULL);
     apr_table_unset(headers, "Connection");
 }
-
 static void add_te_chunked(apr_pool_t *p,
                            apr_bucket_alloc_t *bucket_alloc,
                            apr_bucket_brigade *header_brigade)



Mime
View raw message