httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49391] mod_disk_cache needs to register a cleanup to kill failed responses
Date Thu, 01 Jul 2010 07:52:32 GMT changed:

           What    |Removed                     |Added
           Platform|PC                          |All
         OS/Version|Mac OS X 10.5               |All

--- Comment #2 from 2010-07-01 03:52:29 EDT ---
See many aptmp* files on Solaris webservers too.

Looking at mod_disk_cache.c it appears that:
  1. a tmp file is created, headers written, and tmp file renamed to header
      i.e. store_headers()
  2. a tmp file is created, some data written
      i.e. store_body() for each bucket brigade
  3.   ... more data written to tmp file
      i.e. store_body()
  4. file_cache_el_final() is called to rename tmp file to data file

If a client terminates a connection (presses STOP in their browser, quite a
common thing to happen that should be correctly handled) then it is likely that
store_body() will not be called with a APR_BUCKET_IS_EOS() final bucket. Hence
file_cache_el_final() will never be called.

It would be undesirable to call file_cache_el_final() in the event the
connection was broken because we wouldn't want a partial (invalid) cached
object persisting.

It would be undesirable to use a pool call back to call
file_cache_errorcleanup() in a pool cleanup if the cache store was successful.

So, suggest add a new member to disk_cache_object_t* dobj, an ENUM with the
following states:

Then register a cleanup function with request pool (r->pool). If state is
NOCACHE or CACHED then merely return. If state is HEADERCACHED then remove the
header. If state is DATAPARTIALCACHED then remove header and tmpfile.

Considering that an aborted connection is common place on any serious server
this should have a high priority.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message