1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00
Commit Graph

529 Commits

Author SHA1 Message Date
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
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Graham Leggett
d0d00b5d01 mod_cache: Apply the API change that allows future mod_cache providers to
invalidate cache entries, which will fix PR15868.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208822 13f79535-47bb-0310-9956-ffa450edef68
2011-11-30 21:56:11 +00:00
Guenter Knauf
862faade75 Fixed compilation for non-*nix platforms.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208527 13f79535-47bb-0310-9956-ffa450edef68
2011-11-30 17:16:09 +00:00
Stefan Fritsch
b4ec041ba7 Remove more log message prefixes that are now redundant as the
the error log format includes the module name.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208110 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 22:28:21 +00:00
Stefan Fritsch
3c0136afce Fix some warn_unused_result compiler warnings by checking the return code of
chown and logging an error if the error was not ENOENT.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206827 13f79535-47bb-0310-9956-ffa450edef68
2011-11-27 20:26:49 +00:00
Jim Jagielski
f66d79b8b2 Use varargs...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1205894 13f79535-47bb-0310-9956-ffa450edef68
2011-11-24 15:53:16 +00:00
Jim Jagielski
bf2fc8ee54 Use ap_pass_brigade_fchk()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1205423 13f79535-47bb-0310-9956-ffa450edef68
2011-11-23 15:01:42 +00:00
Graham Leggett
78e657406b mod_cache_disk: Make sure we check return codes on all writes and attempts
to close, and clean up after ourselves in these cases. PR43589.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204599 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 17:06:15 +00:00
Jim Jagielski
0871cc77f8 value never used: dead assignment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204555 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 15:51:44 +00:00
Graham Leggett
4ed1b41510 mod_cache_disk: Remove the unnecessary intermediate brigade while writing
to disk. Fixes a problem where mod_disk_cache was leaving buckets in the
intermediate brigade and not passing them to out on exit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204101 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 22:37:55 +00:00
Graham Leggett
d4780b88c9 mod_cache: Make sure we merge headers correctly when we handle a non
cacheable conditional response. PR52120.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1201331 13f79535-47bb-0310-9956-ffa450edef68
2011-11-12 21:24:47 +00:00
Stefan Fritsch
b5aafabf63 Consistently use base 10 for numbers when parsing config options. It may be
confusing to the user if some directives treat a number with leading zero as
octal while most don't.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180687 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 18:58:21 +00:00
Stefan Fritsch
5c005263d5 Fix a potential NULL pointer dereference found by clang.
Add a AP_DEBUG_ASSERT to quiet a clang false positive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180329 13f79535-47bb-0310-9956-ffa450edef68
2011-10-08 07:41:50 +00:00
Stefan Fritsch
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Jim Jagielski
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
Stefan Fritsch
01ed21af9d Add wrappers for malloc, calloc, realloc that check for out of memory
situations.  Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.

PR 51568, PR 51569, PR 51571.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 16:25:42 +00:00