https://issues.apache.org/bugzilla/show_bug.cgi?id=56898
Bug ID: 56898
Summary: Headers in err_headers_out are not returned when a
cache entry is created/refreshed
Product: Apache httpd-2
Version: 2.4-HEAD
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_cache
Assignee: [email protected]
Reporter: [email protected]
I've raised this against mod_cache because it affects both disk based caches
and in memory caches, though the actual problems occurs in the backends as it
is in shared code.
I originally encountered this with passenger but it happens with CGI as well,
or anything which puts headers in err_headers_out rather than headers_out.
You can reproduce it by configuring a cache as follows:
CacheRoot /path/to/cache-dir
CacheEnable disk /cgi-bin
and then adding a simple CGI script like this:
#!/bin/sh
echo "Content-Type: text/plain"
echo "Last-Modified: Thu, 28 Aug 2014 02:59:59 GMT"
echo "X-Test: yes"
echo ""
echo "Woo!"
If that script is requested with an empty cache then the X-Test header will not
be returned. It will however be added to the cache entry, so that a second
request (which returns it from cache) will return it.
The problem is that cache_merge_headers_out() in cache_util.c calls
apr_table_clear(r->err_headers_out) after it has created the merged headers for
the cached,and that discards the headers in err_headers_out so that they are
never returned.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]