It helps simplifying a lot of duplicated code based on apr_strtoff(), while
also rejecting leading plus/minus signs which are dissalowed in Content-Length
and (Content-)Range headers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877954 13f79535-47bb-0310-9956-ffa450edef68
Expires header value must be interpreted as a
time in the past. So apply the logic concerning
"CacheStoreExpired" and "max-age" and "s-maxage"
handling, which we are already using for a valid
Expires header containing a time in the past,
also to the case of an invalid Expires header.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1833876 13f79535-47bb-0310-9956-ffa450edef68
+ *) mod_cache: Consider Cache-Control: s-maxage in expiration
+ calculations. [Eric Covener]
+
+ *) mod_cache: Allow caching of responses with an Expires header
+ in the past that also has Cache-Control: max-age or s-maxage.
+ PR55156. [Eric Covener]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726675 13f79535-47bb-0310-9956-ffa450edef68
Prior to this revision, there was an apr_atoi64 in this context.
Now, ap_cache_control() sets control.max_age (which is checked here) when
the maxage value was parsed OK.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1718496 13f79535-47bb-0310-9956-ffa450edef68
304 does not contain Content-Type and mod_mime regenerates
the Content-Type based on the r->filename. This later leads to original
Content-Type to be lost (overwriten by whatever mod_mime generates).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665216 13f79535-47bb-0310-9956-ffa450edef68
Define the cache_merge_headers_out() function to merge r->err_headers_out into
r->headers_out and add the ones from r->content_type/encoding if available.
Use it in ap_cache_cacheable_headers_out() where the same is done and in
cache_save_filter() where this has to be done before updating the entry.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594643 13f79535-47bb-0310-9956-ffa450edef68
response. PR 55547.
When mod_cache asks for a revalidation of a stale entry and the origin responds
with a 304 (not that stale), the module strips the non-cacheable headers from
the origin response and merges the stale headers to update the cache.
The problem is that mod_cache won't forward the non-cacheable headers to the
client, for example if the 304 response contains both Set-Cookie and
'Cache-Control: no-cache="Set-Cookie"' headers, or CacheIgnoreHeaders is used.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591328 13f79535-47bb-0310-9956-ffa450edef68
PR 55547.
When the conditional request meets the conditions of the stale then revalidated
entry, the forwarded 304 response includes the entity headers merged from the
cached headers (before updating the entry).
Strip them before returning a 304.
Since the entity headers are stripped elsewhere, factorize the code using a
new table (MOD_CACHE_ENTITY_HEADERS[]) containing these headers's names.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591320 13f79535-47bb-0310-9956-ffa450edef68
PR 55547.
When the conditional request meets the conditions of the stale then revalidated
entry, the forwarded 304 response includes the entity headers merged from the
cached headers (before updating the entry).
Strip them before returning a 304.
Since the entity headers are stripped elsewhere, factorize the code using a
new table (MOD_CACHE_ENTITY_HEADERS[]) containing these headers's names.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591312 13f79535-47bb-0310-9956-ffa450edef68
- Expires, Cache-Control, and/or Vary, if the field-value might
differ from that sent in any previous response for the same
variant
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1518269 13f79535-47bb-0310-9956-ffa450edef68
with weak validation combined with If-Range and Range headers. Break
out explicit conditional header checks to be useable elsewhere in the
server. Ensure weak validation RFC compliance in the byteranges filter.
Ensure RFC validation compliance when serving cached entities. PR 16142
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479905 13f79535-47bb-0310-9956-ffa450edef68
private=header as specified by RFC2616 14.9.1 What is Cacheable. Ensure
that these headers are still processed when multiple Cache-Control
headers are present in the response. PR 54706
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1478382 13f79535-47bb-0310-9956-ffa450edef68