1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

311 Commits

Author SHA1 Message Date
Ruediger Pluem
023b0a4f61 * Correctly detect if CacheIgnoreURLSessionIdentifiers is set.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@778439 13f79535-47bb-0310-9956-ffa450edef68
2009-05-25 15:24:47 +00:00
Ruediger Pluem
cfc67db148 * Use the correct constant.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@778438 13f79535-47bb-0310-9956-ffa450edef68
2009-05-25 15:19:51 +00:00
Ruediger Pluem
d2700640cd * Add CacheIgnoreURLSessionIdentifiers directive to ignore
defined session identifiers encoded in the URL when caching.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@777042 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 10:42:54 +00:00
Joe Orton
e1286998c4 * modules/cache/mod_socache_memcache.c,
modules/cache/mod_socache_shmcb.c, modules/cache/mod_socache_dbm.c:
  Remove references to "SSL" throughout comments and code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757396 13f79535-47bb-0310-9956-ffa450edef68
2009-03-23 13:18:06 +00:00
Lars Eilebrecht
77188b407d fix mod_disk_cache to support EnableSendfile.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@746541 13f79535-47bb-0310-9956-ffa450edef68
2009-02-21 17:07:01 +00:00
Roy T. Fielding
ad2b92fe05 ap_meets_conditions() should not be called until all of
the known content metadata has been set, so that said metadata
can be included in the condition tests and in a 304 response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@743837 13f79535-47bb-0310-9956-ffa450edef68
2009-02-12 18:58:10 +00:00
Eric Covener
940a2bccca look for 'no-cache' in subprocess_env to prevent the saving
of an otherwise cacheable response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@729316 13f79535-47bb-0310-9956-ffa450edef68
2008-12-24 15:03:33 +00:00
William A. Rowe Jr
7266c515bb ditto hack from mpm_default.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@728787 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 21:34:59 +00:00
Ruediger Pluem
8433cdfe67 * Correctly save Content-Encoding of cachable entity.
PR: 46401
Submitted by: Dan Poirier <poirier pobox.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726796 13f79535-47bb-0310-9956-ffa450edef68
2008-12-15 20:45:29 +00:00
Joe Orton
aa062c60f3 socache API tweaks based on chrisd's review:
* include/ap_socache.h (ap_socache_provider_t::store): Take a pool.
  (ap_socache_provider_t::retrieve): Guarantee APR_NOTFOUND for a
  "not found" result.
  (ap_socache_provider_t::remove): Return an apr_status_t.

* modules/cache/mod_socache_dc.c, modules/cache/mod_socache_dbm.c,
  modules/cache/mod_socache_shmcb,
  modules/cache/mod_socache_memcache.c: Adjust accordingly.

* modules/ssl/ssl_scache.c (ssl_scache_store): Pass pool to
  sesscache->store.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726059 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 15:56:15 +00:00
Joe Orton
d578c5df02 * modules/cache/mod_socache_memcache.c (socache_mc_init): Remove references
to SSL in log messages.
  (socache_mc_retrieve): Use 'data' not 'der'; correctly return an error
  for the overflow case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726008 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 13:48:09 +00:00
Joe Orton
184b04b4f8 * modules/cache/mod_socache_memcache.c (socache_mc_create): Fail if
no argument is given.
  (socache_mc_init): Increment the taglen field.
  (socache_mc_id2key): Renamed from mc_session_id2sz and catch key
  name overflow, per rpluem's review.
  (socache_mc_store, socache_mc_retrieve, socache_mc_remove): 
  Adjust for new id2key interface.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726007 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 13:37:59 +00:00
Joe Orton
b078f2374e * include/ap_socache.h: Define AP_SOCACHE_DEFAULT_PROVIDER as a
default provider name, to allow consumers to use a default provider
  if not configured otherwise.

* modules/cache/mod_socache_shmcb.c (register_hooks): Register shmcb
  as the default provider.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724723 13f79535-47bb-0310-9956-ffa450edef68
2008-12-09 14:52:59 +00:00
Joe Orton
dce91079c1 Reduce config overhead for use of socache interface by allowing
default paths to be used if none are configured:

* include/ap_socache.h (ap_socache_provider_t::create):
  Allow arg to be NULL to force use of defaults.
  (ap_socache_provider_t::init): Rename 'namespace' parameter to
  'cname' and restrict to allow use in filesystem paths.
  
* modules/cache/mod_socache_dbm.c (socache_dbm_create, 
  socache_dbm_init),
  modules/cache/mod_socache_shmcb.c (socache_shmcb_create, 
  socache_shmcb_init): 
  Default to use of runtimedir-relative paths if no
  explicit path is configured.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724682 13f79535-47bb-0310-9956-ffa450edef68
2008-12-09 13:11:45 +00:00
Paul Querna
24f396ce76 When an expires or cache-control header are sent, the RFC does allow us to cache normally non-cacheable response statuses.
Submitted by: Alex Polvi <alex polvi.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724093 13f79535-47bb-0310-9956-ffa450edef68
2008-12-07 06:33:02 +00:00
Paul Querna
a73acf02f6 API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
Ruediger Pluem
55b00a33b0 * mod_mem_cache is dead. So remove all hints on it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711576 13f79535-47bb-0310-9956-ffa450edef68
2008-11-05 14:41:02 +00:00
William A. Rowe Jr
40cb414ae6 The mem_cache is dead, long live disk_cache.
Reviewed by: wrowe, sander, fielding, abida, pquerna, jesus, lars

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711470 13f79535-47bb-0310-9956-ffa450edef68
2008-11-04 23:26:14 +00:00
Paul Querna
e1e0efeac8 * modules/cache/mod_socache_dbm.c
(socache_dbm_init) Use AP_NEED_SET_MUTEX_PERMS to determine when we need to
    set the file permissions on the created DBM files, rather than listing 
    a hodgepodge of operating systems by hand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708067 13f79535-47bb-0310-9956-ffa450edef68
2008-10-27 00:43:45 +00:00
Paul Querna
409a8921e3 * modules/cache/mod_socache_dbm.c: Fix compile by including unixd.h on operating
systems that need it, which is required for for the use of unixd_config
    inside socache_dbm_init.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708066 13f79535-47bb-0310-9956-ffa450edef68
2008-10-27 00:40:36 +00:00
William A. Rowe Jr
1ed653d36a Catch up with a host of changes to the current module set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664240 13f79535-47bb-0310-9956-ffa450edef68
2008-06-07 02:10:32 +00:00
William A. Rowe Jr
c14c55d543 Signedness error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664239 13f79535-47bb-0310-9956-ffa450edef68
2008-06-07 02:04:41 +00:00
William A. Rowe Jr
6f0e96cfbc ap_ namespace, a dead giveaway that this information should reside
in the general include\ directory

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664232 13f79535-47bb-0310-9956-ffa450edef68
2008-06-07 01:13:10 +00:00
William A. Rowe Jr
05e2e1ae85 The cache_hash, cache_pqueue and cache_cache functions
are undecorated, their .h files are not propagated into
an installed include/ tree, and were erroniously exported.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664145 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 21:47:08 +00:00
William A. Rowe Jr
87c353a5c0 mod_mem_cache consumes mod_cache, linking this in
two modules is an error.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664143 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 21:45:09 +00:00
William A. Rowe Jr
7158876aaf Revert prior commit; the flaw is not in exporting all
of these cache_* functions, but in declaring them 
exported in the first place.  _hash, _pqueue and cache_cache
are undecorated and were erroniously exported.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664142 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 21:44:25 +00:00
William A. Rowe Jr
0f1189fc9b These are declared CACHE_DECLARE and should be consumed
from mod_cache by mod_mem_cache.  The duplicate cache_util
import is a dead giveaway that this was broken.

In order to backport, an MMN bump would be required because
these cache_pqueue, cache_cache and cache_hash exported
functions would be added to the "contract" of functions
which are available from mod_cache for third party cache
providers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@664136 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 21:23:05 +00:00
Bradley Nicholes
48143c51d5 Add new exports
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@659643 13f79535-47bb-0310-9956-ffa450edef68
2008-05-23 19:52:03 +00:00
Ruediger Pluem
6c1424b8d2 * We need to use the headers_out table we merged above, not the original one.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649793 13f79535-47bb-0310-9956-ffa450edef68
2008-04-19 10:25:16 +00:00
Ruediger Pluem
bed15a9a7f * Style fixes. No functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649792 13f79535-47bb-0310-9956-ffa450edef68
2008-04-19 10:15:14 +00:00
Ruediger Pluem
907b78b12d * Use the correct headers_out table for overlaying.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649791 13f79535-47bb-0310-9956-ffa450edef68
2008-04-19 10:13:34 +00:00
Dirk-Willem van Gulik
b3c481970a Centralize the error-header collapsing done when sending out cached replies. Mark the change in CHANGES as it may have unforseen fall out and/or may need to be reverted or done more subtle.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649460 13f79535-47bb-0310-9956-ffa450edef68
2008-04-18 11:05:25 +00:00
Martin Kraemer
a9091bba7f Make it compile on pre-C99 compilers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649446 13f79535-47bb-0310-9956-ffa450edef68
2008-04-18 10:06:20 +00:00
Ruediger Pluem
e1ae2aa551 * Style police. No functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649228 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 18:48:18 +00:00
Dirk-Willem van Gulik
aa35cf17c2 Centralize hop-by-hop header handling in the main mod_cache code. This change is a no-op -- i.e. we call the same code path as prior to the API renaming. However this is propably wrong; and we should have been cleansing the content-types all along
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649179 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 16:40:10 +00:00
Dirk-Willem van Gulik
0701f89d30 Centralize hop-by-hop header handling in the memory caching code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649178 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 16:38:36 +00:00
Dirk-Willem van Gulik
a0561f4c05 Centralize hop-by-hop header handling in the disk caching code. Note that 'out' now has actual out semantics; hence the change in headers_in.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649176 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 16:37:24 +00:00
Dirk-Willem van Gulik
53d475f654 Currently each of the caching module includes logic to implement
the hop-by-hop rules of rfc 2616 along with the entity response
rules. To make sure that they stay in sync; and to make it easier
to add (http) caching modules - this change moves them all into
one place (cache_util) and exposes a in-bound and out-bound
version to operate on the headers.

In short: we retire ap_cache_cacheable_hdrs_out() which was used
for both in- and out-put headers; and replace it by a single
ap_cache_cacheable_headers() which understands the hop-by-hop
rules. And then wrap this into an in- and out-put specific 
ap_cache_cacheable_headers_in()/out() which we can teach things
about entity responses and so on.. The latter which will also 
merge error and ensure content-type. 

This API change bumps up the minor MM by one.    



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649162 13f79535-47bb-0310-9956-ffa450edef68
2008-04-17 16:03:13 +00:00
Chris Darroch
719bf72489 remove const on socache module declarations to avoid segfault in
ap_setup_prelinked_modules() when modules linked in at compile time


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@648499 13f79535-47bb-0310-9956-ffa450edef68
2008-04-16 04:02:57 +00:00
Chris Darroch
76e9c2b0ba Fix socache modules' APACHE_MODULE() definitions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646945 13f79535-47bb-0310-9956-ffa450edef68
2008-04-10 20:24:42 +00:00
Joe Orton
14972fdb0d * modules/cache/ap_socache.h: Doxify.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646415 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 16:13:02 +00:00
Guenter Knauf
cf462757db oops - checked in wrong makefile.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646182 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 02:45:08 +00:00
Guenter Knauf
77f9db943d added new chache modules to NetWare build.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@646177 13f79535-47bb-0310-9956-ffa450edef68
2008-04-09 02:01:27 +00:00
Joe Orton
bd632a3388 * modules/cache/mod_socache_dbm.c: Fix some dodgy formatting, thanks rpluem.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645984 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 16:04:12 +00:00
Joe Orton
2e2731f3f9 Adjust socache init interface to take sizing hints, and namespace tag
for memcache:

* modules/cache/ap_socache.h (struct ap_socache_hints): New structure.
  Change init callback to take namespace string and hints structure pointer.

* modules/cache/mod_socache_dc.c (socache_dc_init): Adjust accordingly.

* modules/cache/mod_socache_dbm.c (struct ap_socache_instance_t): Rename
  timeout field to expiry_interval.
  (socache_dbm_init, socache_dbm_create): Take expiry interval from
  hints rather than hard-code to 30.
  (socache_dbm_expire): Update for timeout field rename.

* modules/cache/mod_socache_shmcb.c (socache_shmcb_init): Adjust for
  hints and namespace; adjust subcache index sizing heuristics to use
  passed-in hints.

* modules/cache/mod_socache_memcache.c (struct ap_socache_instance_t):
  Add tag, taglen fields.
  (socache_mc_init): Store the passed-in namespace in instance
  structure.
  (mc_session_id2sz): Adjust to not take context, use configured
  tag as string prefix, and not use a return value.
  (socache_mc_store, socache_mc_retrieve, socache_mc_remove):
  Adjust for mc_session_id2sz interface changes.

* modules/ssl/ssl_scache.c (ssl_scache_init): Pass namespace and hints
  to socache provider init function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645978 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 15:47:48 +00:00
Joe Orton
39bb462ea8 * modules/cache/ap_socache.h: Add ap_socache_instance_t object type.
Adjust the provider interface to use this instance type throughout.

* modules/cache/mod_socache_dbm.c,
  modules/cache/mod_socache_memcache.c,
  modules/cache/mod_socache_shmcb.c,
  modules/cache/mod_socache_dc.c: Adjust all implementations to 
  define the instance object in place of the "struct context", and
  to take this object directly in the provider interface.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645924 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 13:49:52 +00:00
Joe Orton
3279936028 Session cache interface redesign, Part 8:
Abstract out the mod_ssl session caching interface into a separate set
of modules, mod_socache_*.

* modules/cache/ap_socache.h: New file.

* modules/cache/config.m4: Copy CHECK_DISTCACHE from ../ssl/config.m4; 
  add new socache modules.

* modules/cache/mod_socache_dbm.c: Copied from ../ssl/ssl_scache_dbm.c.
  s/ssl_scache_/socache_/; add module structure and register_hooks.

* modules/cache/mod_socache_shmcb.c: Copied from ../ssl/ssl_scache_shmcb.c.
  s/ssl_scache_/socache_/; add module structure and register_hooks.
  Add SHMCB_MAX_SIZE definition, replacing APR_SHM_MAXSIZE.

* modules/cache/mod_socache_memcache.c: Copied from
  ../ssl/ssl_scache_memcache.c.
  s/ssl_scache_/socache_/; add module structure and register_hooks.
  Enable for APR-Util 1.3.x at compile-time, omitting configure-time
  checks.

* modules/cache/mod_socache_dc.c: Copied from ../ssl/ssl_scache_dc.c.
  s/ssl_scache_/socache_/; add module structure and register_hooks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645844 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 10:47:04 +00:00
Paul Querna
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
Ruediger Pluem
1fb72c6dd2 * Do not do Range requests if we use our own conditionals for validating
a cache entity: If we get 304 the Range does not matter and otherwise the
  entity changed and we want to have the complete entity.

PR: 44579


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@636653 13f79535-47bb-0310-9956-ffa450edef68
2008-03-13 07:28:40 +00:00
Ruediger Pluem
e858f16bfb * Restore the original request headers if the cached resource was stale, as they
may be needed by further output filters like the byterange filter to make the
  correct decisions.

PR: 44579


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@636386 13f79535-47bb-0310-9956-ffa450edef68
2008-03-12 16:07:46 +00:00