--On Tuesday, June 7, 2005 2:01 PM -0700 Justin Erenkrantz <[EMAIL PROTECTED]> wrote:

--On Tuesday, June 7, 2005 1:50 PM -0700 Justin Erenkrantz
<[EMAIL PROTECTED]> wrote:

to be a better way.  For now, I'll commit a fix that matches what we did
with mod_proxy; but this pattern keeps emerging.  -- justin

I'm not going to commit it yet.  However, I'm building a new httpd on
ajax with the following patch.  -- justin

The patch needed one more tweak to set the status before calling the filters. So far, it looks okay on ajax off: http://wiki.apache.org:81/

Perhaps we should try again to stick it into production?  Heh.  -- justin

Index: mod_cgi.c
===================================================================
--- mod_cgi.c   (revision 188864)
+++ mod_cgi.c   (working copy)
@@ -921,7 +921,18 @@
        int ret;

        if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) {
-            return log_script(r, conf, ret, dbuf, sbuf, bb, script_err);
+            ret = log_script(r, conf, ret, dbuf, sbuf, bb, script_err);
+
+            /* Set our status. */
+            r->status = ret;
+
+            /* Pass EOS bucket down the filter chain. */
+            apr_brigade_cleanup(bb);
+            b = apr_bucket_eos_create(c->bucket_alloc);
+            APR_BRIGADE_INSERT_TAIL(bb, b);
+            ap_pass_brigade(r->output_filters, bb);
+
+            return ret;
        }

        location = apr_table_get(r->headers_out, "Location");

Reply via email to