httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Z. Yang" <ezy...@MIT.EDU>
Subject [PATCH] Send no response on 304/204
Date Tue, 24 Mar 2009 02:02:29 GMT
Hello all,

A patch was attached to Bug 40953, and it would be nice if some
developers could take a look at it and give some feedback and/or commit
it to the tree.

I've reposted the patch here for your convenience:

--- server/util_script.c        (revision 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)) {

Cheers,
Edward


Mime
View raw message