Graham Leggett
e225273e6a
mod_cache: Ensure that we don't attempt to replace a cached response
...
with an older response as per RFC2616 13.12.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479966 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 16:16:16 +00:00
Graham Leggett
6194962c46
core, mod_cache: Ensure RFC2616 compliance in ap_meets_conditions()
...
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
2013-05-07 13:42:31 +00:00
Graham Leggett
e362111d24
mod_cache: Ensure that updated responses to HEAD requests don't get
...
mistakenly paired with a previously cached body. Ensure that any existing
body is removed when a HEAD request is cached.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479411 13f79535-47bb-0310-9956-ffa450edef68
2013-05-05 22:27:31 +00:00
Graham Leggett
0eb8aa4a48
mod_cache: Honour Cache-Control: no-store in a request.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479222 13f79535-47bb-0310-9956-ffa450edef68
2013-05-05 01:12:48 +00:00
Graham Leggett
4d2b3c1a7d
mod_cache: RFC2616 14.9.3 The s-maxage directive also implies the
...
semantics of the proxy-revalidate directive.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479216 13f79535-47bb-0310-9956-ffa450edef68
2013-05-04 23:03:13 +00:00
Graham Leggett
d1612031a9
mod_cache: Make sure that contradictory entity headers present in a 304
...
Not Modified response are caught and cause the entity to be removed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479117 13f79535-47bb-0310-9956-ffa450edef68
2013-05-04 14:55:03 +00:00
Guenter Knauf
99a323a122
Silent no-prototype compiler warning.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1478798 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 14:05:01 +00:00
Graham Leggett
0ef0994152
mod_cache: Make sure Vary processing handles multivalued Vary headers and
...
multivalued headers referred to via Vary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1478748 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 12:19:26 +00:00
Graham Leggett
f18afbfba1
mod_cache: When serving from cache, only the last header of a multivalued
...
header was taken into account. Fixed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1478441 13f79535-47bb-0310-9956-ffa450edef68
2013-05-02 16:51:27 +00:00
Graham Leggett
9f68cf2010
mod_cache: Ignore response headers specified by no-cache=header and
...
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
2013-05-02 14:24:26 +00:00
Graham Leggett
d32086bb4c
Apply log message tags to messages.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1478173 13f79535-47bb-0310-9956-ffa450edef68
2013-05-01 20:06:57 +00:00
Graham Leggett
6e77e5b20f
mod_cache: Invalidate cached entities in response to RFC2616 Section
...
13.10 Invalidation After Updates or Deletions. PR 15868
Resolves outstanding issue with r1070179 as per
http://www.gossamer-threads.com/lists/apache/dev/395830?do=post_view_threaded#395830
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1478140 13f79535-47bb-0310-9956-ffa450edef68
2013-05-01 18:49:04 +00:00
Christophe Jaillet
aa6112daa6
Make option "CacheDisable" in mod_cache case insensitive.
...
PR 54462 reported by Tianyin Xu [tixu cs ucsd edu]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1464721 13f79535-47bb-0310-9956-ffa450edef68
2013-04-04 20:13:19 +00:00
Christophe Jaillet
c9ddf49c3f
Name pool + concat string at compile time when possible
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1462643 13f79535-47bb-0310-9956-ffa450edef68
2013-03-29 20:59:22 +00:00
Eric Covener
320fb1fc4e
fix merge of min/max file size by setting corresponding _set
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1453604 13f79535-47bb-0310-9956-ffa450edef68
2013-03-06 22:59:41 +00:00
Christophe Jaillet
523996f1f6
cache_storage: remove useless test + update function name in debug log + skip as soon as we know headers do not match
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452281 13f79535-47bb-0310-9956-ffa450edef68
2013-03-04 13:02:09 +00:00
Christophe Jaillet
bb69ec6cfe
Remove useless tests.
...
Turn
if (*x && apr_isspace(*x))
into
if (apr_isspace(*x))
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452128 13f79535-47bb-0310-9956-ffa450edef68
2013-03-03 21:25:46 +00:00
Rainer Jung
dba4500a80
Cache does no longer send Content-Type header
...
for fresh content.
Followup to r1361153+r1373447 (PR 53539, wrong
Content-Type for stale content).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1439083 13f79535-47bb-0310-9956-ffa450edef68
2013-01-27 13:49:17 +00:00
Christophe Jaillet
67246c45cd
According top my testing 'socache_mc_id2key' is 6x faster with the use 'ap_bin2hex' instead of
...
apr_snprintf(..., "%02X" for each character.
Output is *not* exactly the same. It was uppercase, now it is lowercase.
According to my understanding, this is not an issue.
Should it be, a call to ap_str_toupper should be added.
The speedup would be less, but still significant.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1429561 13f79535-47bb-0310-9956-ffa450edef68
2013-01-06 17:52:43 +00:00
Graham Leggett
869a9b68ed
mod_cache_socache: Don't clean up too soon. If we do, revalidated requests
...
lose their bodies.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418648 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:04:33 +00:00
Jeff Trawick
381f28c8ae
fix a comment to match the r1299718/r1370225 changes...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407385 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 08:50:07 +00:00
Jeff Trawick
85ec79e3ce
The following now respects DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR:
...
- mod_cache: thundering herd lock directory
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407381 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 08:44:08 +00:00
Ruediger Pluem
cb1d5f4750
* Ensure that nkey is initialized.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1406760 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 19:26:48 +00:00
Ruediger Pluem
e149d2f783
* fd is no member of disk_cache_object_t. Instead it is a member of
...
disk_cache_file_t. Close all fd's (fd, tempfd) for all cache elements
(hdrs, data, vary) if they are present.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1405856 13f79535-47bb-0310-9956-ffa450edef68
2012-11-05 16:01:23 +00:00
Eric Covener
43f03d9407
*) mod_cache_disk: Resolve errors while revalidating disk-cached files on
...
Windows ("...rename tempfile to datafile failed..."). PR 38827
[Eric Covener]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1405494 13f79535-47bb-0310-9956-ffa450edef68
2012-11-04 03:22:33 +00:00
Guenter Knauf
6ae33e7334
Added mod_cache_socache to NetWare build.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1392214 13f79535-47bb-0310-9956-ffa450edef68
2012-10-01 05:36:39 +00:00
Graham Leggett
c764558c0d
Apply proper APLOGNO codes for mod_cache_socache.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1391398 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 11:10:06 +00:00
Graham Leggett
22c2623820
Fix the return values on mod_cache_socache's store_headers() implementation
...
to return APR errors codes and not DECLINED. We are committed to using this
implementation by this point, and any error should force us to stand down.
Submitted by: trawick
Reviewed by: minfrin
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1391396 13f79535-47bb-0310-9956-ffa450edef68
2012-09-28 11:05:55 +00:00
Gregg Lewis Smith
f696d241c7
Windows build for mod_cache_socache added in r1388660
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1388899 13f79535-47bb-0310-9956-ffa450edef68
2012-09-22 21:14:00 +00:00
Graham Leggett
55c799dc0d
mod_cache_socache: New cache implementation backed by mod_socache
...
that replaces mod_mem_cache removed from httpd v2.2.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1388660 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 20:10:16 +00:00
Kaspar Brand
089f0eb0ac
Spin off module-specific build options into separate build vars.
...
[second try, supersedes r1385214]
Add MOD_CFLAGS, MOD_LDFLAGS variables etc. to the build commands,
which are available to modules for customization on a per-subdir
basis (by adding definitions to modules.mk). Reduces the risk
of side-effects when a module needs to add CFLAGS, LDFLAGS etc.
and these would be added to the global settings (ALL_CFLAGS etc.).
Adapt build settings for mod_ssl, mod_socache_dc, mod_deflate,
mod_xml2enc, mod_proxy_html, and mod_lua to use the new MOD_xxx
build variables.
Change PICFLAGS, SHLTCFLAGS and LTCFLAGS into config vars, instead
of AC_SUBSTing them in build/rules.mk.in. For support/ab, introduce
ab_CFLAGS and ab_LDFLAGS, and define explicit make targets where
they appear at the proper position in the build commands.
Consistently use "--with-xxx=PATH" in configure help strings which
are used to specify a path to the installation directory of an
auxiliary package.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385216 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 06:19:13 +00:00
Kaspar Brand
5eb4537e2a
revert r1385214, as I inadvertently left out acinclude.m4.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385215 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 06:16:35 +00:00
Kaspar Brand
3aaa0378b6
Spin off module-specific build options into separate build vars.
...
Add MOD_CFLAGS, MOD_LDFLAGS variables etc. to the build commands,
which are available to modules for customization on a per-subdir
basis (by adding definitions to modules.mk). Reduces the risk
of side-effects when a module needs to add CFLAGS, LDFLAGS etc.
and these would be added to the global settings (ALL_CFLAGS etc.).
Adapt build settings for mod_ssl, mod_socache_dc, mod_deflate,
mod_xml2enc, mod_proxy_html, and mod_lua to use the new MOD_xxx
build variables.
Change PICFLAGS, SHLTCFLAGS and LTCFLAGS into config vars, instead
of AC_SUBSTing them in build/rules.mk.in. For support/ab, introduce
ab_CFLAGS and ab_LDFLAGS, and define explicit make targets where
they appear at the proper position in the build commands.
Consistently use "--with-xxx=PATH" in configure help strings which
are used to specify a path to the installation directory of an
auxiliary package.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385214 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 05:55:02 +00:00
Rainer Jung
d247f6bafb
Wrong content type and character set when
...
mod_cache serves stale content because of
a proxy error.
PR 53539.
Correction to r1361153.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1373447 13f79535-47bb-0310-9956-ffa450edef68
2012-08-15 15:06:24 +00:00
Rainer Jung
83295d3e7b
Fix bus error in mod_socache_shmcb due to a misalignment
...
in some 64 bit builds, especially on Solaris Sparc.
PR 53040
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1373270 13f79535-47bb-0310-9956-ffa450edef68
2012-08-15 08:38:53 +00:00
Guenter Knauf
7814748ab3
NetWare build tweaks.
...
Make more use of internal makefile macros;
axed now obsolete include paths.
Submitted by: normw gknw net.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371177 13f79535-47bb-0310-9956-ffa450edef68
2012-08-09 12:11:09 +00:00
Jeff Trawick
a9896837af
mod_socache_shmcb and mod_socache_dbm: finish support of
...
DefaultRuntimeDir
a partial conversion was made in r1299718, affecting cases
where no filename was specified
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1370225 13f79535-47bb-0310-9956-ffa450edef68
2012-08-07 12:44:30 +00:00
Ruediger Pluem
423370980e
* Set content type in case we return stale content.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361153 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 11:04:09 +00:00
Joe Orton
381ac02df2
* modules/cache/cache_util.c (write_write_order): Remove redundant
...
double assignment, caught by Coverity. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1352534 13f79535-47bb-0310-9956-ffa450edef68
2012-06-21 14:01:57 +00:00
Stefan Fritsch
fe4f92509b
Replace use of apr_file_write() with apr_file_write_full() to prevent
...
incomplete writes.
Add comments in some places where error handling/logging is missing.
PR: 53131.
Submitted by: Nicolas Viennot <apache viennot biz>, Stefan Fritsch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331110 13f79535-47bb-0310-9956-ffa450edef68
2012-04-26 21:44:51 +00:00
Igor Galić
79b9700a6f
fix style, no code change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1310819 13f79535-47bb-0310-9956-ffa450edef68
2012-04-07 18:39:01 +00:00
Jim Jagielski
5caa336986
Move away from DEFAULT_REL_RUNTIMEDIR and use ap_runtime_dir_relative()
...
API
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1299718 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 15:45:03 +00:00
Stefan Fritsch
d79b3c1513
Fix various filter functions to return apr_status_t instead of int
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1240315 13f79535-47bb-0310-9956-ffa450edef68
2012-02-03 19:48:01 +00:00
Stefan Fritsch
f21ee09d4a
More configure time dependencies:
...
mod_cache_disk depends on mod_cache
mod_heartbeat depends on mod_watchdog
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1234297 13f79535-47bb-0310-9956-ffa450edef68
2012-01-21 10:26:51 +00:00
Stefan Fritsch
42c9e0b393
Avoid segfault if url->hostname is NULL and filter->hostname is "*" or ".".
...
Found by clang.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1220467 13f79535-47bb-0310-9956-ffa450edef68
2011-12-18 17:38:24 +00:00
Guenter Knauf
8b1ee4309e
Removed import file since now dynamically generated.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1211379 13f79535-47bb-0310-9956-ffa450edef68
2011-12-07 10:29:56 +00:00
Guenter Knauf
6c8d44705e
NetWare build fixes.
...
Create mod_cache.imp dynamically; fixed mod_cache_disk NLM name.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210926 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 14:18:01 +00:00
Graham Leggett
00f036ee38
mod_cache: Remove dead code from the legacy mod_mem_cache module.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210892 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 13:03:34 +00:00
Stefan Fritsch
6f6ecbeae7
Change the provider names to match the module names:
...
mod_slotmem_shm: shared -> shm
mod_socache_memcache: mc -> memcache
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210221 13f79535-47bb-0310-9956-ffa450edef68
2011-12-04 21:03:34 +00:00
Graham Leggett
26559c25c5
mod_cache: Remove ap_cache_liststr(), it duplicates ap_find_token().
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209798 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 00:31:53 +00:00