1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-28 11:57:22 +03:00
Commit Graph

23 Commits

Author SHA1 Message Date
Jim Jagielski
21efb981a2 Merge r1496711, r1597533, r1649491, r1665216, r1756553, r1756631, r1726675, r1718496, r1718476, r1747469 from trunk:
recognize the "default handler name" in r->handler, which is used when
no SetHandler/AddHandler and no matching mimetype during type_checker.

Submitted by: Eric Covener


mod_cache: try to use the key of a possible open but stale cache entry
if we have one in cache_try_lock(). PR 50317

Submitted by: Ruediger Pluem


* modules/cache/mod_socache_memcache.c (socache_mc_store): Pass
  through expiration time.

Submitted by: Faidon Liambotis <paravoid debian.org>, jorton


* mod_cache: Preserve the Content-Type in case of 304 response.
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).


mod_cache: Use the actual URI path and query-string for identifying the
cached entity (key), such that rewrites are taken into account when
running afterwards (CacheQuickHandler off).  PR 21935.
 


mod_cache: follow up to r1756553: log the real/actual cached URI (debug).



better s-maxage support
 
+  *) 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]




remove dead code leftover from r1023387. 

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.



duplicate debug-level AH00764 in the just-validated path.



Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
Submitted by: jkaluza, jorton, jkaluza, ylavic, ylavic, covener, covener, covener, wrowe
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1772331 13f79535-47bb-0310-9956-ffa450edef68
2016-12-02 11:42:13 +00:00
Jim Jagielski
c62375851b Merge r1700317, r1700318, r1700319, r1700320, r1700321, r1700322, r1700326, r1700328, r1700330, r1700331, r1700332, r1700334, r1700336, r1700338 from trunk:
Fix some spurious ident spotted by sparse

Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting


Silence a sparse warning about inconsistent indenting + some minor style issues

Remove useless line

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues

Fix some spurious ident spotted by sparse

Silence a sparse warning about inconsistent indenting + some minor style issues

Silence a sparse warning about inconsistent indenting + some minor style issues
Submitted by: jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1701772 13f79535-47bb-0310-9956-ffa450edef68
2015-09-08 11:10:16 +00:00
Jeff Trawick
982486ece0 Merge from trunk r1547845:
mod_cache_disk: Fix potential hangs on Windows when using mod_cache_disk.

PR: 55833
Submitted by: covener
Reviewed by: jim, trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1555721 13f79535-47bb-0310-9956-ffa450edef68
2014-01-06 12:02:38 +00:00
Graham Leggett
5eca70cf6f * easy proposals to synch 2.4.x and trunk
- log.c: avoid needless apr_pstrdup()
  - Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
  - Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
  - Remove redundant check
  - 'ap_getword_conf' does not return NULL but an empty string
  - Ease logic around 'ap_getword_conf' and drop useless line of code.
  - 'ap_getword_conf' can not return NULL
  - 'ap_getword_conf' can not return NULL
  - Remove redundant check (already performed the line before)
  - Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable
trunk patches:
  - https://svn.apache.org/viewvc?view=revision&revision=1532122
  - https://svn.apache.org/viewvc?view=revision&revision=1549676
  - https://svn.apache.org/viewvc?view=revision&revision=1549680
  - https://svn.apache.org/viewvc?view=revision&revision=1550651
  - https://svn.apache.org/viewvc?view=revision&revision=1551005
  - https://svn.apache.org/viewvc?view=revision&revision=1551009
  - https://svn.apache.org/viewvc?view=revision&revision=1551010
  - https://svn.apache.org/viewvc?view=revision&revision=1551011
  - https://svn.apache.org/viewvc?view=revision&revision=1551012
  - https://svn.apache.org/viewvc?view=revision&revision=1551013
2.4.x patches: trunk patches work
               http://people.apache.org/~jim/patches/ez-2.4-v2.patch
+1: jailletc36, jim, minfrin


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1553532 13f79535-47bb-0310-9956-ffa450edef68
2013-12-26 18:08:28 +00:00
Jim Jagielski
d302ce4d30 Merge r1406068, r1425777, r1427546, r1462643, r1487530, r1493330 from trunk:
Replace duplicate log tags


Check that AsyncRequestWorkerFactor is not negative

PR :54254
Submitted by: Jackie Zhang <jackie qq zhang gmail com>


remove unneeded include statements


Name pool + concat string at compile time when possible

* modules/filters/mod_ratelimit.c (rate_limit_filter): Log the error
  code.


Correct typo in error message
Submitted by: sf, jailletc36, jorton, jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1502204 13f79535-47bb-0310-9956-ffa450edef68
2013-07-11 12:24:26 +00:00
Graham Leggett
647644a650 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.

trunk patch: http://svn.apache.org/r1479411

Submitted by: minfrin
Reviewed by: jim, wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1487122 13f79535-47bb-0310-9956-ffa450edef68
2013-05-28 21:12:19 +00:00
Graham Leggett
a10b5d0491 mod_cache: Invalidate cached entities in response to RFC2616 Section
13.10 Invalidation After Updates or Deletions. PR 15868

trunk patch: http://svn.apache.org/r1070179
             http://svn.apache.org/r1478140
             http://svn.apache.org/r1478173
             http://svn.apache.org/r1478798
2.4.x patch: http://people.apache.org/~minfrin/httpd-mod_cache-invalidate7.patch

Submitted by: minfrin
Reviewed by: jim, wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1487102 13f79535-47bb-0310-9956-ffa450edef68
2013-05-28 20:30:04 +00:00
Jim Jagielski
9cfbdb0e6f Merge r1452128 from trunk:
Remove useless tests.

Turn
   if (*x && apr_isspace(*x))
into
   if (apr_isspace(*x))
Submitted by: jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1467980 13f79535-47bb-0310-9956-ffa450edef68
2013-04-15 12:42:00 +00:00
Jim Jagielski
48a96a8817 Merge r1453604 from trunk:
fix merge of min/max file size by setting corresponding _set


Submitted by: covener
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1465986 13f79535-47bb-0310-9956-ffa450edef68
2013-04-09 12:15:44 +00:00
Jim Jagielski
18eb5b7bbb Merge r1331110 from trunk:
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

Submitted by: sf
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1430514 13f79535-47bb-0310-9956-ffa450edef68
2013-01-08 20:49:50 +00:00
Jim Jagielski
532425808a Merge r1405856 from trunk:
* 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.

Submitted by: rpluem
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1420827 13f79535-47bb-0310-9956-ffa450edef68
2012-12-12 16:52:34 +00:00
Stefan Fritsch
b6ae8ca44a Backport r1209766, r1210252, r1210284:
Add lots of unique tags to error log messages

ssl_util.c: Downgrade some dynamic locking messages from level DEBUG
to TRACE1-3


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1210287 13f79535-47bb-0310-9956-ffa450edef68
2011-12-05 00:08:01 +00:00
Graham Leggett
3b02fd0501 Backport:
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/branches/2.4.x@1208824 13f79535-47bb-0310-9956-ffa450edef68
2011-11-30 22:00:43 +00:00
Stefan Fritsch
a776148e2d Merge r1208110:
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/branches/2.4.x@1208112 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 22:30:42 +00:00
Graham Leggett
116453a05a Backport:
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/branches/2.4.x@1204602 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 17:09:44 +00:00
Graham Leggett
a611609fd0 Backport:
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/branches/2.4.x@1204102 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 23:05:46 +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
c9fd2623da Introduce ap_(get|set)_core_module_config() functions/macros and use them
everywhere.

We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +00:00
Graham Leggett
1bb3c4b8a9 mod_cache_disk: Prevent a segfault should we receive a further bucket after
we have committed the cached entry.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078104 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 19:07:22 +00:00
Graham Leggett
d35c89b1e0 mod_cache_disk: Only attempt to commit to the initialisation if the attempt
to open the cache file was successful.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078083 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 18:11:32 +00:00
Rainer Jung
c8f912e613 Further trivial updates mod_disk_cache -> mod_cache_disk.
No functional change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039300 13f79535-47bb-0310-9956-ffa450edef68
2010-11-26 10:20:16 +00:00
Graham Leggett
326483b5e0 Rename disk_cache to cache_disk within logging statements.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037247 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 15:57:11 +00:00
Graham Leggett
27637bfdd8 mod_disk_cache renamed to mod_cache_disk, to be consistent with the
naming of other modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037229 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 14:58:34 +00:00