Skip to content

Commit 77d5782

Browse files
committed
Avoid duplicating Content-Type header
1 parent ee833ac commit 77d5782

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cgi/mapcache.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ static void fcgi_write_response(mapcache_context_fcgi *ctx, mapcache_http_respon
126126
int i;
127127
for(i=0; i<elts->nelts; i++) {
128128
apr_table_entry_t entry = APR_ARRAY_IDX(elts,i,apr_table_entry_t);
129-
printf("%s: %s\r\n", entry.key, entry.val);
129+
if (!strcasecmp(entry.key, "Content-Type")) {
130+
printf("%s: %s\r\n", entry.key, entry.val);
131+
}
130132
}
131133
}
132134
if(response->mtime) {
@@ -337,6 +339,7 @@ int main(int argc, const char **argv)
337339
goto cleanup;
338340
}
339341

342+
//set_headers(ctx, apr_pstrdup(ctx->pool, environ));
340343
set_headers(ctx, environ);
341344

342345
http_response = NULL;

0 commit comments

Comments
 (0)