httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r693577 - in /httpd/httpd/trunk: CHANGES modules/filters/mod_charset_lite.c
Date Tue, 09 Sep 2008 19:58:13 GMT
Author: rpluem
Date: Tue Sep  9 12:58:12 2008
New Revision: 693577

URL: http://svn.apache.org/viewvc?rev=693577&view=rev
Log:
* Use send_bucket_downstream to send data down the chain instead of creating
  a brigade each time.

PR: 45687
Submitted by: Dan Poirier <poirier pobox.com>
Reviewed by: rpluem

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/filters/mod_charset_lite.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=693577&r1=693576&r2=693577&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Sep  9 12:58:12 2008
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_charset_lite: Avoid dropping error responses by handling meta buckets
+     correctly. PR 45687 [Dan Poirier <poirier pobox.com>]
+
   *) mod_authnz_ldap: don't return NULL-valued environment variables to
      other modules.  PR 39045 [Francois Pesce <francois.pesce gmail.com>]
 

Modified: httpd/httpd/trunk/modules/filters/mod_charset_lite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_charset_lite.c?rev=693577&r1=693576&r2=693577&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_charset_lite.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_charset_lite.c Tue Sep  9 12:58:12 2008
@@ -376,6 +376,20 @@
  *   will be generated
  */
 
+static apr_status_t send_bucket_downstream(ap_filter_t *f, apr_bucket *b)
+{
+    charset_filter_ctx_t *ctx = f->ctx;
+    apr_status_t rv;
+
+    APR_BRIGADE_INSERT_TAIL(ctx->tmpbb, b);
+    rv = ap_pass_brigade(f->next, ctx->tmpbb);
+    if (rv != APR_SUCCESS) {
+        ctx->ees = EES_DOWNSTREAM;
+    }
+    apr_brigade_cleanup(ctx->tmpbb);
+    return rv;
+}
+
 /* send_downstream() is passed the translated data; it puts it in a single-
  * bucket brigade and passes the brigade to the next filter
  */
@@ -383,19 +397,10 @@
 {
     request_rec *r = f->r;
     conn_rec *c = r->connection;
-    apr_bucket_brigade *bb;
     apr_bucket *b;
-    charset_filter_ctx_t *ctx = f->ctx;
-    apr_status_t rv;
 
-    bb = apr_brigade_create(r->pool, c->bucket_alloc);
     b = apr_bucket_transient_create(tmp, len, c->bucket_alloc);
-    APR_BRIGADE_INSERT_TAIL(bb, b);
-    rv = ap_pass_brigade(f->next, bb);
-    if (rv != APR_SUCCESS) {
-        ctx->ees = EES_DOWNSTREAM;
-    }
-    return rv;
+    return send_bucket_downstream(f, b);
 }
 
 static apr_status_t send_eos(ap_filter_t *f)
@@ -417,20 +422,6 @@
     return rv;
 }
 
-static apr_status_t send_bucket_downstream(ap_filter_t *f, apr_bucket *b)
-{
-    charset_filter_ctx_t *ctx = f->ctx;
-    apr_status_t rv;
-
-    APR_BRIGADE_INSERT_TAIL(ctx->tmpbb, b);
-    rv = ap_pass_brigade(f->next, ctx->tmpbb);
-    if (rv != APR_SUCCESS) {
-        ctx->ees = EES_DOWNSTREAM;
-    }
-    apr_brigade_cleanup(ctx->tmpbb);
-    return rv;
-}
-
 static apr_status_t set_aside_partial_char(charset_filter_ctx_t *ctx,
                                            const char *partial,
                                            apr_size_t partial_len)



Mime
View raw message