Skip to content

Commit 11f7713

Browse files
authored
Merge pull request #265 from geographika/content-headers
Avoid duplicating Content-Type header
2 parents 7bc0ad9 + 31fe060 commit 11f7713

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cgi/mapcache.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ 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+
printf("%s: %s\r\n", entry.key, entry.val);
130130
}
131131
}
132132
if(response->mtime) {
@@ -370,6 +370,8 @@ int main(int argc, const char **argv)
370370
} else if( request->type == MAPCACHE_REQUEST_PROXY ) {
371371
mapcache_request_proxy *req_proxy = (mapcache_request_proxy*)request;
372372
http_response = mapcache_core_proxy_request(ctx, req_proxy);
373+
// Content-Length is added again in fcgi_write_response
374+
apr_table_unset(http_response->headers, "Content-Length");
373375
} else if( request->type == MAPCACHE_REQUEST_GET_MAP) {
374376
mapcache_request_get_map *req_map = (mapcache_request_get_map*)request;
375377
http_response = mapcache_core_get_map(ctx,req_map);

0 commit comments

Comments
 (0)