]> granicus.if.org Git - apache/commitdiff
mod_lua: Remove ETAG, Content-Length, and Content-MD5 when a LuaOutputFilter
authorEric Covener <covener@apache.org>
Mon, 2 Sep 2013 17:45:40 +0000 (17:45 +0000)
committerEric Covener <covener@apache.org>
Mon, 2 Sep 2013 17:45:40 +0000 (17:45 +0000)
is configured without mod_filter. [Eric Covener]

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

CHANGES
modules/lua/mod_lua.c

diff --git a/CHANGES b/CHANGES
index 5864a31af23b3dc74672aff3fff737f702637784..7260c952d51b443641eba9829ad0def63a180d17 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_lua: Remove ETAG, Content-Length, and Content-MD5 when a LuaOutputFilter
+     is configured without mod_filter. [Eric Covener]
+
   *) mod_lua: Register LuaOutputFilter scripts as changing the content and
      content-length by default, when run my mod_filter.  Previously,
      growing or shrinking a response that started with Content-Length set
index 4efe0e6dbaf8a182214b5d84a234f25240b601a1..bdf5b16dfb194463fe4edf16bc0b7029d42b335c 100644 (file)
@@ -377,6 +377,12 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil
              */
             rc = lua_resume(L, 1);
             if (rc == LUA_YIELD) {
+                if (f->frec->providers == NULL) { 
+                    /* Not wired by mod_filter */
+                    apr_table_unset(r->headers_out, "Content-Length");
+                    apr_table_unset(r->headers_out, "Content-MD5");
+                    apr_table_unset(r->headers_out, "ETAG");
+                }
                 return OK;
             }
             else {