Commit Graph

564 Commits

Author SHA1 Message Date
11a39fba77 don't pass uninitialized rv passed to ap_log_rerror()
(rv wasn't interesting / follow an existing example)

stop throwing away a pointer on the heap

(clang scan-build)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1534892 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 01:32:32 +00:00
e62246ac2b SECURITY (CVE-2013-4352): Fix a NULL pointer deference which allowed
untrusted origin servers to crash mod_cache in a forward proxy configuration.

mod_cache: Avoid a crash with strcmp() when the hostname is not provided.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1523235 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 13:32:25 +00:00
397bdd8c43 Expires in a 304 is not a contradiction in terms of r1487118:
- 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
2013-08-28 16:07:50 +00:00
e7bb7d063a Limit SHMCB_MAX_SIZE to min(UINT_MAX, APR_SIZE_MAX) to match the current code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1515162 13f79535-47bb-0310-9956-ffa450edef68
2013-08-18 16:30:21 +00:00
39ebf1bf09 reflow a very long line, no functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1502665 13f79535-47bb-0310-9956-ffa450edef68
2013-07-12 19:33:19 +00:00
80475f6ca2 fix whitespace in AH00766 warning:
s/all of theinput/all of the input/



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1501423 13f79535-47bb-0310-9956-ffa450edef68
2013-07-09 18:21:43 +00:00
3b905a6fb4 Fix some compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1500362 13f79535-47bb-0310-9956-ffa450edef68
2013-07-07 03:12:52 +00:00
7df09b69d4 recognize the "defualt handler name" in r->handler, which is used when
no SetHandler/AddHandler and no matching mimetype during type_checker.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1496711 13f79535-47bb-0310-9956-ffa450edef68
2013-06-26 02:32:39 +00:00
472f2a43ba Fix "variable 'rv' may be used uninitialized
in this function" warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494536 13f79535-47bb-0310-9956-ffa450edef68
2013-06-19 10:21:46 +00:00
8bad51f56a Correct the use of the printf formatter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1493925 13f79535-47bb-0310-9956-ffa450edef68
2013-06-17 20:34:26 +00:00
96d4951170 mod_socache_shmcb.c: Remove arbitrary restriction on shared memory size
previously limited to 64MB.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1493921 13f79535-47bb-0310-9956-ffa450edef68
2013-06-17 20:22:10 +00:00
1dbe136a17 mod_cache_socache: Make sure the CacheSocacheMaxSize directive is merged
correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1492663 13f79535-47bb-0310-9956-ffa450edef68
2013-06-13 13:16:18 +00:00
7e7f76f56c const goodness with nasty strrchr and strchr functions
(resolve warning in maintainer mode)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491564 13f79535-47bb-0310-9956-ffa450edef68
2013-06-10 18:43:45 +00:00
c0d199e03a mod_cache_socache: Use the name of the socache implementation when performing
a lookup rather than using the raw arguments.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491458 13f79535-47bb-0310-9956-ffa450edef68
2013-06-10 14:08:43 +00:00
c6971bfe19 Fixed signed<->unsigned compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1490550 13f79535-47bb-0310-9956-ffa450edef68
2013-06-07 09:04:32 +00:00
ca2948ea2d update log tags
replace duplicate, add missing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481396 13f79535-47bb-0310-9956-ffa450edef68
2013-05-11 19:45:09 +00:00
a6d1be91ef mod_cache: If a 304 response indicates an entity not currently cached, then
the cache MUST disregard the response and repeat the request without the 
conditional.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481197 13f79535-47bb-0310-9956-ffa450edef68
2013-05-10 21:40:54 +00:00
5c93801e65 Ensure that Warning headers are correctly handled as per RFC2616.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1480283 13f79535-47bb-0310-9956-ffa450edef68
2013-05-08 14:06:48 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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