]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Apply backport... fix "conflicts" with CHANGES and ap_mmn.h
authorJim Jagielski <jim@apache.org>
Thu, 15 Nov 2007 22:08:30 +0000 (22:08 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 15 Nov 2007 22:08:30 +0000 (22:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@595474 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
include/ap_mmn.h
include/httpd.h
modules/http/http_core.c
modules/ssl/ssl_engine_io.c
server/core.c
server/mpm/experimental/event/event.c

diff --git a/CHANGES b/CHANGES
index f5e63c2886fc4d9446a2a5627288a9935e4b9b0b..31487b8d2b63477c70bbe04558c01020fa1c76dd 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.7
 
+  *) Event MPM: Add support for running under mod_ssl, by reverting to the
+     Worker MPM behaviors, when run under an input filter that buffers
+     its own data. [Paul Querna]
+
   *) mod_charset_lite: Don't crash when the request has no associated
      filename.  [Jeff Trawick]
 
@@ -1658,7 +1662,6 @@ Changes with Apache 2.1.1
   *) Rewrite of aaa modules to an authn/authz model.
      [Dirk-Willem van Gulik, Justin Erenkrantz]
 
-
   [Apache 2.1.0-dev includes those bug fixes and changes with the
    Apache 2.0.xx tree as documented, and except as noted, below.]
 
diff --git a/STATUS b/STATUS
index 8b254bacf4ad72996c4c3697abb35418255a8011..f1ad08adea43ec9006d3e07656488c855eb29cc7 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -79,17 +79,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * Event MPM: Add clogging_input_filters to the conn_rec, enabling mod_ssl
-      to revert to the Worker MPM IO behavoirs, rather than just hanging, when 
-      using the Event MPM. (minor MMN bump)
-      Trunk version of patch:
-        http://svn.apache.org/viewvc?view=rev&revision=360257
-        http://svn.apache.org/viewvc?view=rev&revision=546328
-        http://svn.apache.org/viewvc?view=rev&revision=546650
-        http://svn.apache.org/viewvc?view=rev&revision=546715
-      2.2.x version of patch:
-        http://people.apache.org/~pquerna/eventmpm-ssl-input-2.2.x.patch
-    +1: pquerna, jim, rpluem
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index c9d0be2ca086adb37fd4ecc7394ef5b1edd48bb3..80187a2e4aeed3bd5b3ca0843b5572cb7343e0af 100644 (file)
  *                         ap_get_server_description() (minor)
  * 20051115.5 (2.2.5)  Added ap_mpm_safe_kill() (minor)
  * 20051115.6 (2.2.7)  Added retry_set to proxy_worker (minor)
+ * 20051115.7 (2.2.7)  Added conn_rec::clogging_input_filters (minor)
  *
  */
 
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20051115
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 6                     /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 7                     /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index 8c784ee5109f8be61a244c5eeb0f73a7802c43a3..15e1f11ddea13b31a18866743a66c13a753276be 100644 (file)
@@ -1096,6 +1096,11 @@ struct conn_rec {
     conn_state_t *cs;
     /** Is there data pending in the input filters? */ 
     int data_in_input_filters;
+    
+    /** Are there any filters that clogg/buffer the input stream, breaking
+     *  the event mpm.
+     */
+    int clogging_input_filters;
 };
 
 /** 
index 1e4da5d10f9d47a2e1f814e91faced8aee974a0e..be1e1138fca6f8b854fe35d657cb6a3eab6656f0 100644 (file)
@@ -42,6 +42,8 @@ AP_DECLARE_DATA ap_filter_rec_t *ap_chunk_filter_handle;
 AP_DECLARE_DATA ap_filter_rec_t *ap_http_outerror_filter_handle;
 AP_DECLARE_DATA ap_filter_rec_t *ap_byterange_filter_handle;
 
+static int ap_process_http_connection(conn_rec *c);
+
 static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy,
                                           const char *arg)
 {
@@ -124,6 +126,10 @@ static int ap_process_http_async_connection(conn_rec *c)
     request_rec *r;
     conn_state_t *cs = c->cs;
 
+    if (c->clogging_input_filters) {
+        return ap_process_http_connection(c);
+    }
+    
     AP_DEBUG_ASSERT(cs->state == CONN_STATE_READ_REQUEST_LINE);
 
     while (cs->state == CONN_STATE_READ_REQUEST_LINE) {
index f3917ea10b5053149dde9c972e2a070df3cb4817..644b57c3ecc3329b35a572e6428d5095fbafbacd 100644 (file)
@@ -1665,6 +1665,9 @@ void ssl_io_filter_init(conn_rec *c, SSL *ssl)
     filter_ctx->pbioWrite       = BIO_new(&bio_filter_out_method);
     filter_ctx->pbioWrite->ptr  = (void *)bio_filter_out_ctx_new(filter_ctx, c);
 
+    /* We insert a clogging input filter. Let the core know. */
+    c->clogging_input_filters = 1;
+    
     ssl_io_input_add_filter(filter_ctx, c, ssl);
 
     SSL_set_bio(ssl, filter_ctx->pbioRead, filter_ctx->pbioWrite);
index 5ba897d9f8f73e6109ce023606c3ba030ccd0324..7a78dab337505058933110dad5d9c97bcb7ecf12 100644 (file)
@@ -3909,6 +3909,7 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *server,
 
     c->id = id;
     c->bucket_alloc = alloc;
+    c->clogging_input_filters = 0;
 
     return c;
 }
index cfff13267f1dac5ca095e5c676f7f489e63fd60a..261468eaa9227308c329a2d0419a261bb3f8261d 100644 (file)
@@ -623,6 +623,15 @@ static int process_socket(apr_pool_t * p, apr_socket_t * sock,
         c->sbh = sbh;
     }
 
+    if (c->clogging_input_filters && !c->aborted) {
+        /* Since we have an input filter which 'cloggs' the input stream,
+         * like mod_ssl, lets just do the normal read from input filters,
+         * like the Worker MPM does.
+         */
+        ap_run_process_connection(c);
+        cs->state = CONN_STATE_LINGER;
+    }
+
     if (cs->state == CONN_STATE_READ_REQUEST_LINE) {
         if (!c->aborted) {
             ap_run_process_connection(c);
@@ -639,7 +648,6 @@ static int process_socket(apr_pool_t * p, apr_socket_t * sock,
 
     if (cs->state == CONN_STATE_LINGER) {
         ap_lingering_close(c);
-        apr_bucket_alloc_destroy(cs->bucket_alloc);
         apr_pool_clear(p);
         ap_push_pool(worker_queue_info, p);
         return 1;