httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40953] Should not send any data in 1xx/204/304 reply from CGI/PHP/Servlet
Date Thu, 19 Feb 2009 00:27:32 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=40953





--- Comment #7 from Nick Kew <nick@webthing.com>  2009-02-18 16:27:30 PST ---
This now looks like two separate issues.  Comment 6 concerns a 302 response
with a Content-Length header but too much content.  FWIW, I expect it can be
more easily duplicated with mod_asis.

FWIW, I *think* (but haven't tested - bug me if I drop it) the following patch
should fix the original issue.  But it won't do anything for your 302 case.

--- server/util_script.c        (revision 745696 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=745696
))
+++ server/util_script.c        (working copy)
@@ -488,6 +488,11 @@
             if ((cgi_status == HTTP_UNSET) && (r->method_number == M_GET)) {
                 cond_status = ap_meets_conditions(r);
             }
+            else if ((cgi_status == HTTP_NO_CONTENT) ||
+                     (cgi_status == HTTP_NOT_MODIFIED) ||
+                     ap_is_HTTP_INFO(cgi_status)) {
+                r->header_only = 1; /* discard any body */
+            }
             apr_table_overlap(r->err_headers_out, merge,
                 APR_OVERLAP_TABLES_MERGE);
             if (!apr_is_empty_table(cookie_table)) {


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message