https://bz.apache.org/bugzilla/show_bug.cgi?id=62493
--- Comment #2 from Jeff W <[email protected]> --- Created attachment 36000 --> https://bz.apache.org/bugzilla/attachment.cgi?id=36000&action=edit preserve request bodies after 304 revalidation After looking at the source code at some length, it appears that the issue here is that mod_cache_disk writes headers and bodies separately, and mod_cache_socache writes them together, but mod_cache assumes the former behavior. Consequently, mod_cache_socache is never given a request body. This patch adds a "preserve_body" handler to cache providers that lets them preserve the request body when only the headers are being changed. Two implementations are provided. The implementation for mod_cache_socache feeds the body brigade from the stale cache entry to the store_body handler for the new entry. The implementation for mod_cache_disk is a no-op. This was the most efficient solution I could find; it seems like the only other way for mod_cache_socache to preserve the request body while updating headers would be to re-read the stale entry. Since it's already been read once, reusing the existing one appears to be the better choice. Nonetheless, this is probably not the best way to do this, so if there's a better approach I would welcome the feedback. Thanks! -- 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]
