1
0
mirror of https://github.com/apache/httpd.git synced 2025-04-18 22:24:07 +03:00

30 Commits

Author SHA1 Message Date
Giovanni Bechis
56745ba205 add error message when storing data to temp file fails.
Github: closes #182


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908684 13f79535-47bb-0310-9956-ffa450edef68
2023-03-24 08:50:19 +00:00
Christophe Jaillet
d2b64c9bc6 Fix a few warnings on 64 bits windows compilation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881305 13f79535-47bb-0310-9956-ffa450edef68
2020-08-29 20:49:36 +00:00
Yann Ylavic
11d03dc86a core,modules: provide/use ap_parse_strict_length() helper.
It helps simplifying a lot of duplicated code based on apr_strtoff(), while
also rejecting leading plus/minus signs which are dissalowed in Content-Length
and (Content-)Range headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877954 13f79535-47bb-0310-9956-ffa450edef68
2020-05-20 14:01:17 +00:00
Mike Rumph
85760859ca Fix spelling errors found by codespell. [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873985 13f79535-47bb-0310-9956-ffa450edef68
2020-02-13 18:15:57 +00:00
Joe Orton
b01a818821 * modules/cache/mod_cache_disk.c (write_headers): Handle
mkdir_structure error case.  Fixes Coverity warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1842926 13f79535-47bb-0310-9956-ffa450edef68
2018-10-05 14:38:28 +00:00
Rainer Jung
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
Eric Covener
d965bf637f disk_cache: improve logging of errors around reading stored headers
-- add RV and print cache filename from caller.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1721210 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 16:38:51 +00:00
Christophe Jaillet
8a804d09ba Silence a sparse warning about inconsistent indenting + some minor style issues
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700326 13f79535-47bb-0310-9956-ffa450edef68
2015-08-31 20:13:30 +00:00
Christophe Jaillet
a0164c6ce7 Use apr_pstrmemdup instead of apr_pstrndup when this is safe.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1549680 13f79535-47bb-0310-9956-ffa450edef68
2013-12-09 21:11:09 +00:00
Eric Covener
d40eaa2b65 Only close hdrs.fd when returning non-OK from cache_select(),
because it will be read from in the very next mod_cache callback
recall_headers().  Problem masked on unix by buffering.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1547845 13f79535-47bb-0310-9956-ffa450edef68
2013-12-04 17:09:42 +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
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
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
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
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
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
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
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
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
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
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