1
0
mirror of https://github.com/apache/httpd.git synced 2025-07-30 20:03:10 +03:00

678 Commits

Author SHA1 Message Date
ffeacdcc52 Fix typo in code comments; dependancies -> dependencies
Submitted by: John Bampton <jbampton gmail.com>
Github: closes #520


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924446 13f79535-47bb-0310-9956-ffa450edef68
2025-03-18 09:54:15 +00:00
cbadd66236 * Take care for the case where nkey is NULL
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921067 13f79535-47bb-0310-9956-ffa450edef68
2024-10-01 12:11:09 +00:00
4fc2fd7dd5 Make sources build with latest clang version
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909450 13f79535-47bb-0310-9956-ffa450edef68
2023-04-27 07:14:36 +00:00
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
51471bb1a8 APR (and APR-util) 1.3 is a requirement for building httpd 2.4 and above.
So these compatibility tests can be removed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897325 13f79535-47bb-0310-9956-ffa450edef68
2022-01-22 07:32:36 +00:00
b72da39d62 Add log tags.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891023 13f79535-47bb-0310-9956-ffa450edef68
2021-06-24 14:17:02 +00:00
95592b5dda dbm: Split the loading of a dbm driver from the opening of a dbm file. When
an attempt to load a dbm driver fails, log clearly which driver triggered
the error (not "default"), and what the error was.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891019 13f79535-47bb-0310-9956-ffa450edef68
2021-06-24 10:27:49 +00:00
42b28ae335 mod_socache_shmcb: be safe from socache_shmcb_destroy() late call.
ssl_init_Module() in post_config early registers ssl_init_ModuleKill(), which
will then run after all the next cleanups registered later in post_config, thus
any shm_cleanup() registered from ssl_scache_init::socache_shmcb_init().
This can cause a double SHM cleanup when apr_shm_destroy() is called from
ssl_init_ModuleKill() as pconf is cleared.

Fix this in mod_socache_shmcb by registering a socache_shmcb_cleanup() after
the SHM is created, and by letting socache_shmcb_destroy() run the cleanup,
such that shm_cleanup() is always and ever called only once.

Ideally apr_shm_create() would be consistent accross platforms to register its
shm_cleanup() on the pool but that's not the case for now (I'm on it), so httpd
has to call apr_shm_destroy() explicitely from several places (we'll be able to
remove ssl_scache_kill() and other similar cleanups once the minimal APR
version required by httpd is fixed..).

We could also fix this by registering ssl_init_ModuleKill() late(r) in
ssl_init_Module(), though the more robust mod_socache_shmcb the better for
all the modules..


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1888266 13f79535-47bb-0310-9956-ffa450edef68
2021-04-01 09:14:34 +00:00
242d341756 Add missing "const" or "static const" qualifiers in some command_rec
definitions.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1882053 13f79535-47bb-0310-9956-ffa450edef68
2020-09-27 07:52:55 +00:00
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
2c94e2b214 Fix a few warnings on 64 bits windows compilation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881304 13f79535-47bb-0310-9956-ffa450edef68
2020-08-29 20:44:03 +00:00
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
9751e3006d add include to test_char.h now required
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877590 13f79535-47bb-0310-9956-ffa450edef68
2020-05-11 16:47:18 +00:00
f461bcf12c Add missing pool tags to help debugging.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876599 13f79535-47bb-0310-9956-ffa450edef68
2020-04-16 12:32:33 +00:00
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
aa885488bc Addendum to r1856493: check NULLness of new arg parameter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1859791 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 14:29:10 +00:00
cc33262df2 * modules/cache/mod_socache_shmcb.c (socache_shmcb_init): Describe
error better for anon shm failure case, fixing gcc 9 warning on
  passing NULL for '%s'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1858565 13f79535-47bb-0310-9956-ffa450edef68
2019-05-03 09:07:32 +00:00
28064636a7 mod_cache: follow up to r1856493: cache_strqtok() to reject quoted tokens.
Use a real state machine to track where quotes are allowed, and for
better clarity too...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856507 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 22:39:31 +00:00
f2a066e584 mod_cache: follow up to r1856493: always terminate cache_strqtok() returns.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856500 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 18:22:23 +00:00
00bd49eaa5 mod_cache: Fix parsing of quoted Cache-Control token arguments. PR 63288.
Make cache_strqtok() return both the token and its unquoted argument (if any),
or an error if the parsing fails.

Cache-Control integer values (max-age, max-stale, ...) can then be parsed w/o
taking care of the (optional) quoting.

Suggested by: fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856493 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 16:39:39 +00:00
3b156a19e8 mod_cache_socache: avoid pool to heap reallocation.
Below some threshold, the previous code tried free (sub-)pooled memory ASAP by
moving small buffers (< capacity / 2) to a heap bucket. But this is not really
an optimization because first it requires at some point to allocate more than
the configured capacity, and second since this happens during response handling
the pool is about to be destroyed soon anymay.

This commit simply keeps the data in the subpool and uses a pool bucket for the
output brigade to take care of the lifetime until it's consumed (or not).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853874 13f79535-47bb-0310-9956-ffa450edef68
2019-02-19 11:51:27 +00:00
393aa13887 When a :port is included in the CacheKeyBaseURL the ":" is lost from the actual cache key value. This doesn't harm apache by itself, the real problem arise if some external program which "knows" about the cache keys structure is used to modify the cache.
When CacheKeyBaseURL is not use, the ":" is kept.

So, be consistent when building the key and keep the ":" in all cases.

PR 53915 [Rein Tollevik <rein basefarm.no>]

+ merge 2 lines of a comment to have it more compact

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1851146 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 07:51:48 +00:00
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
a920a90838 Axe some redundant conditions. PR 62549.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837941 13f79535-47bb-0310-9956-ffa450edef68
2018-08-13 12:54:30 +00:00
7bb2bf1e65 mod_cache: Per RFC 7234 section 5.3 an invalid
Expires header value must be interpreted as a
time in the past. So apply the logic concerning
"CacheStoreExpired" and "max-age" and "s-maxage"
handling, which we are already using for a valid
Expires header containing a time in the past,
also to the case of an invalid Expires header.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1833876 13f79535-47bb-0310-9956-ffa450edef68
2018-06-19 22:40:19 +00:00
d0d1b2d833 Use apr_pcalloc in the 'create' function. All the fields are initialized in the 'init' function, but it is It is cleaner and more future proof.
Small style correction (remove extra spaces)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1828624 13f79535-47bb-0310-9956-ffa450edef68
2018-04-08 08:31:22 +00:00
c53e01afa4 Save a few cycles.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824716 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 06:20:26 +00:00
c5c2bbc8cc mod_cache_socache: Fix caching of empty headers up to carriage return.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824343 13f79535-47bb-0310-9956-ffa450edef68
2018-02-15 18:31:25 +00:00
130ccb055f some small tweaks to get things building again
replace mod_socache_redis.dsp as original was corrupted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1821581 13f79535-47bb-0310-9956-ffa450edef68
2018-01-19 01:54:42 +00:00
8d0889252c Synch style in comment with 2.4.x.
Style was different when r1496711  has been backported in r1772331

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789002 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 20:06:31 +00:00
97c9589568 Group bit field values in order to save some memory.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1789000 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 19:52:43 +00:00
2cd566b817 Improve indentation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788998 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 19:49:58 +00:00
8533abfc41 Save a few cycles.
'apr_pstrcatv' can compute the length of the new string for us.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788996 13f79535-47bb-0310-9956-ffa450edef68
2017-03-27 19:48:19 +00:00
fb5baf3b81 mod_cache: Fix a regression in 2.4.25 for the forward proxy case by
computing and using the same entity key according to when the cache
checks, loads and saves the request.  PR 60577.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783842 13f79535-47bb-0310-9956-ffa450edef68
2017-02-21 08:20:45 +00:00
a309dd8ef3 Remove a useless break + tiny style fix (missing space)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777557 13f79535-47bb-0310-9956-ffa450edef68
2017-01-06 09:59:32 +00:00
6976db2d38 Use apr_pstrmemdup instead of apr_pstrndup when applicable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777556 13f79535-47bb-0310-9956-ffa450edef68
2017-01-06 09:56:53 +00:00
332211a25c mod_socache_redis also uses mod_status hooks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774655 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 19:43:16 +00:00
3e3b82a036 related to http://svn.apache.org/viewvc?view=revision&revision=1774602
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774610 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 15:04:21 +00:00
517ad45470 Add ../generators to include path for Windows
build of mod_socache_memcache. It now needs
mod_status.h.

Untested but exactly analogous to what works for
mod_socache_shmcb and others.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774609 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 15:00:06 +00:00
9ffa25af4b Use correct format pattern, "%lu" is wrong for
apr_uint64_t on some platforms.

Followup to r1649491.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774602 13f79535-47bb-0310-9956-ffa450edef68
2016-12-16 14:43:06 +00:00
c53918d6e2 html elements
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774018 13f79535-47bb-0310-9956-ffa450edef68
2016-12-13 14:04:40 +00:00
309678648f From Norm:
NWGNUsocachmem needs to find mod_status.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1770828 13f79535-47bb-0310-9956-ffa450edef68
2016-11-22 12:22:31 +00:00
f8b4fe0fa0 Fix some HTML tags
</br> --> <br />

Couls also be <br> or <br/> but some (very) old clients don't like it.
httpd is not really consistent on it. (personnlaly <br> would be just fine for me but <br /> is the most commonly used form)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769737 13f79535-47bb-0310-9956-ffa450edef68
2016-11-15 06:42:48 +00:00
8c7355d3c3 reorganize mod_socache_redis so it compiles w/o apr-redis
It looks like this was the original intent. The provider
is not registered if apr-redis is missing.

It was previously failing to compile due to the dirconf being
hidden behind the #ifdef guard but not the routine module
code that used it.




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1769712 13f79535-47bb-0310-9956-ffa450edef68
2016-11-15 03:15:15 +00:00
bcfb765174 heh... bring memcache up to redis :)
mod_status info

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768245 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 16:47:43 +00:00
21083eccdb Needs LOGNO #s
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768225 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 14:47:17 +00:00
60833dccde And provide some nice usage stats. Could be prettier, for sure.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768120 13f79535-47bb-0310-9956-ffa450edef68
2016-11-04 23:06:08 +00:00
8b5ea8fdef And the socache provider interface for Redis
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1768070 13f79535-47bb-0310-9956-ffa450edef68
2016-11-04 17:04:28 +00:00
42ac649538 mod_cache: follow up to r1756553: log the real/actual cached URI (debug).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756631 13f79535-47bb-0310-9956-ffa450edef68
2016-08-17 13:22:20 +00:00
0370f02651 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.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756553 13f79535-47bb-0310-9956-ffa450edef68
2016-08-16 21:48:09 +00:00