Skip to content

Instantly share code, notes, and snippets.

@aheadley
Created December 6, 2016 20:51
Show Gist options
  • Save aheadley/147eddda29448a37839d660140b1b670 to your computer and use it in GitHub Desktop.
Save aheadley/147eddda29448a37839d660140b1b670 to your computer and use it in GitHub Desktop.
Patch for mod_fastcgi 2.4.6 to not barf on duplicate response headers.
--- mod_fastcgi.c.orig 2012-05-18 17:37:08.831652311 -0400
+++ mod_fastcgi.c 2012-05-18 17:42:49.333693792 -0400
@@ -718,9 +718,6 @@
if (strcasecmp(name, "Status") == 0) {
int statusValue = strtol(value, NULL, 10);
- if (hasStatus) {
- goto DuplicateNotAllowed;
- }
if (statusValue < 0) {
fr->parseHeader = SCAN_CGI_BAD_HEADER;
return ap_psprintf(r->pool, "invalid Status '%s'", value);
@@ -733,9 +730,6 @@
if (fr->role == FCGI_RESPONDER) {
if (strcasecmp(name, "Content-type") == 0) {
- if (hasContentType) {
- goto DuplicateNotAllowed;
- }
hasContentType = TRUE;
#ifdef APACHE2
ap_set_content_type(r, value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment