httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1487459 - in /httpd/httpd/branches/2.2.x: ./ docs/ docs/manual/mod/ modules/experimental/mod_example.c modules/filters/mod_ext_filter.c modules/http/http_request.c server/main.c
Date Wed, 29 May 2013 12:35:01 GMT
Author: trawick
Date: Wed May 29 12:35:00 2013
New Revision: 1487459

URL: http://svn.apache.org/r1487459
Log:
mergeinfo for r1487458

Modified:
    httpd/httpd/branches/2.2.x/   (props changed)
    httpd/httpd/branches/2.2.x/docs/   (props changed)
    httpd/httpd/branches/2.2.x/docs/manual/mod/   (props changed)
    httpd/httpd/branches/2.2.x/modules/experimental/mod_example.c
    httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c
    httpd/httpd/branches/2.2.x/modules/http/http_request.c
    httpd/httpd/branches/2.2.x/server/main.c

Propchange: httpd/httpd/branches/2.2.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1487451

Propchange: httpd/httpd/branches/2.2.x/docs/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs:r1487451

Propchange: httpd/httpd/branches/2.2.x/docs/manual/mod/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/mod:r1487451

Modified: httpd/httpd/branches/2.2.x/modules/experimental/mod_example.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/experimental/mod_example.c?rev=1487459&r1=1487458&r2=1487459&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/experimental/mod_example.c (original)
+++ httpd/httpd/branches/2.2.x/modules/experimental/mod_example.c Wed May 29 12:35:00 2013
@@ -922,7 +922,7 @@ static const char *x_http_scheme(const r
     /*
      * Log the call and exit.
      */
-    trace_add(r->server, NULL, cfg, "x_http_scheme()");
+    trace_add(r->server, r, cfg, "x_http_scheme()");
     return "example";
 }
 
@@ -941,7 +941,7 @@ static apr_port_t x_default_port(const r
     /*
      * Log the call and exit.
      */
-    trace_add(r->server, NULL, cfg, "x_default_port()");
+    trace_add(r->server, r, cfg, "x_default_port()");
     return 80;
 }
 #endif /*0*/
@@ -961,7 +961,7 @@ static void x_insert_filter(request_rec 
     /*
      * Log the call and exit.
      */
-    trace_add(r->server, NULL, cfg, "x_insert_filter()");
+    trace_add(r->server, r, cfg, "x_insert_filter()");
 }
 
 /*
@@ -979,7 +979,7 @@ static int x_quick_handler(request_rec *
     /*
      * Log the call and exit.
      */
-    trace_add(r->server, NULL, cfg, "x_quick_handler()");
+    trace_add(r->server, r, cfg, "x_quick_handler()");
     return DECLINED;
 }
 

Modified: httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c?rev=1487459&r1=1487458&r2=1487459&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c Wed May 29 12:35:00 2013
@@ -67,7 +67,7 @@ typedef struct ef_ctx_t {
     apr_procattr_t *procattr;
     ef_dir_t *dc;
     ef_filter_t *filter;
-    int noop;
+    int noop, hit_eos;
 #if APR_FILES_AS_SOCKETS
     apr_pollset_t *pollset;
 #endif
@@ -856,6 +856,7 @@ static int ef_unified_filter(ap_filter_t
     if (eos) {
         b = apr_bucket_eos_create(c->bucket_alloc);
         APR_BRIGADE_INSERT_TAIL(bb, b);
+        ctx->hit_eos = 1;
     }
 
     return APR_SUCCESS;
@@ -939,6 +940,14 @@ static int ef_input_filter(ap_filter_t *
         ctx = f->ctx;
     }
 
+    if (ctx->hit_eos) {
+        /* Match behaviour of HTTP_IN if filter is re-invoked after
+         * hitting EOS: give back another EOS. */
+        apr_bucket *e = apr_bucket_eos_create(f->c->bucket_alloc);
+        APR_BRIGADE_INSERT_TAIL(bb, e);
+        return APR_SUCCESS;
+    }
+
     if (ctx->noop) {
         ap_remove_input_filter(f);
         return ap_get_brigade(f->next, bb, mode, block, readbytes);

Modified: httpd/httpd/branches/2.2.x/modules/http/http_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/http/http_request.c?rev=1487459&r1=1487458&r2=1487459&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/http/http_request.c (original)
+++ httpd/httpd/branches/2.2.x/modules/http/http_request.c Wed May 29 12:35:00 2013
@@ -243,16 +243,16 @@ static void check_pipeline_flush(request
         }
     }
 
-        e = apr_bucket_flush_create(c->bucket_alloc);
+    e = apr_bucket_flush_create(c->bucket_alloc);
 
-        /* We just send directly to the connection based filters.  At
-         * this point, we know that we have seen all of the data
-         * (request finalization sent an EOS bucket, which empties all
-         * of the request filters). We just want to flush the buckets
-         * if something hasn't been sent to the network yet.
-         */
-        APR_BRIGADE_INSERT_HEAD(bb, e);
-        ap_pass_brigade(r->connection->output_filters, bb);
+    /* We just send directly to the connection based filters.  At
+     * this point, we know that we have seen all of the data
+     * (request finalization sent an EOS bucket, which empties all
+     * of the request filters). We just want to flush the buckets
+     * if something hasn't been sent to the network yet.
+     */
+    APR_BRIGADE_INSERT_HEAD(bb, e);
+    ap_pass_brigade(r->connection->output_filters, bb);
 }
 
 void ap_process_request(request_rec *r)

Modified: httpd/httpd/branches/2.2.x/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/main.c?rev=1487459&r1=1487458&r2=1487459&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/main.c (original)
+++ httpd/httpd/branches/2.2.x/server/main.c Wed May 29 12:35:00 2013
@@ -626,6 +626,10 @@ int main(int argc, const char * const ar
      */
 
     ap_server_root = def_server_root;
+    if (ap_server_root_relative(ptemp, "foo") == NULL) {
+        fail();
+    }
+
     if (temp_error_log) {
         ap_replace_stderr_log(process->pool, temp_error_log);
     }
@@ -707,6 +711,10 @@ int main(int argc, const char * const ar
         apr_pool_create(&ptemp, pconf);
         apr_pool_tag(ptemp, "ptemp");
         ap_server_root = def_server_root;
+        if (ap_server_root_relative(ptemp, "foo") == NULL) {
+            fail();
+        }
+
         server_conf = ap_read_config(process, ptemp, confname, &ap_conftree);
         if (!server_conf) {
             destroy_and_exit_process(process, 1);



Mime
View raw message