httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56898] New: Headers in err_headers_out are not returned when a cache entry is created/refreshed
Date Thu, 28 Aug 2014 20:07:09 GMT
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: bugs@httpd.apache.org
          Reporter: tom@compton.nu

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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message