122 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
88afb529ab Use ap_os_is_path_absolute() to make it portable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915400 13f79535-47bb-0310-9956-ffa450edef68
2024-01-25 14:36:45 +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
a9abc422d8 Reverting r1870454 for this source.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1870499 13f79535-47bb-0310-9956-ffa450edef68
2019-11-27 11:16:56 +00:00
dd8ba20047 *) mod_http2: Fixed interaction with mod_reqtimeout. A loaded mod_http2 was disabling the
ssl handshake timeouts. Also, fixed a mistake of the last version that made `H2Direct` 
     always `on`, irregardless of configuration. Found and reported by
     <Armin.Abfalterer@united-security-providers.ch> and
     <Marcial.Rion@united-security-providers.ch>. [Stefan Eissing] 

  *) mod_http2: Multiple field length violations in the same request no longer cause
     several log entries to be written. [@mkauf]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1870454 13f79535-47bb-0310-9956-ffa450edef68
2019-11-26 09:36:28 +00:00
c557a7ac32 * modules/slotmem/mod_slotmem_shm.c (restore_slotmem): Remove
redundant assignment (clang warning), the apr_file_eof(fp)=>APR_EOF
  case assigns rv to APR_EOF and then to APR_SUCCESS after already.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1842882 13f79535-47bb-0310-9956-ffa450edef68
2018-10-05 10:17:18 +00:00
ad2008443c mod_slotmem_shm: follow up to r1831869: fix dead else if condition.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1832479 13f79535-47bb-0310-9956-ffa450edef68
2018-05-29 20:22:44 +00:00
8f9833972f mod_slotmem_shm: follow up to r1831869: fix persisted file size's checksum.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831935 13f79535-47bb-0310-9956-ffa450edef68
2018-05-20 12:19:13 +00:00
e86620ff6b mod_slotmem_shm: follow up to r1831869 (check persistent files).
Since persistent files are also reused on stop/start, we must ensure that
they match the same descriptor when reused on the next startup, so add it
to integrity metadata.

Also, the descriptor being the first field in the SHM, we don't need to
copy on the stack it in several places, and can handle it as a pointer.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831871 13f79535-47bb-0310-9956-ffa450edef68
2018-05-18 17:05:18 +00:00
6473ad7a0b mod_slotmem_shm: follow up to r1831869.
Don't try to attach SHMs on startup, they might be from a previous crash and
prevent the server to start (on failure to reuse it).

On mpm_winnt though, the pre/post_config() phases are re-run in child process,
and the parent process already created the SMs, so they must be attached there.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831870 13f79535-47bb-0310-9956-ffa450edef68
2018-05-18 16:48:34 +00:00
9fa142563c mod_slotmem_shm: use a generation number for SHM filename on all platforms.
Successive generations can't share the same SHMs because restarts may modify
them under the terminating children, while SHMs are not extensible when all
slots are in use.

This effectively restores r1822341 which was reverted by r1822505.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831869 13f79535-47bb-0310-9956-ffa450edef68
2018-05-18 16:33:28 +00:00
c83994e1d0 Restore mod_slotmem_shm from 2.4.29.
Will restart from there to really fix PR 62308 (and PR 62044 still).

This effectively reverts:
- r1831394,
- r1830800,
- r1826970,
- r1826845,
- r1823572,
- r1823416,
- r1823415,
- r1823412,
- r1822511,
- r1822509.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831868 13f79535-47bb-0310-9956-ffa450edef68
2018-05-18 16:22:21 +00:00
eb353ffa5d mod_slotmem_shm: follow up to r1830800, preserve callee API.
The caller might (and actually balancer_child_init() does) rely on
slotmem_attach() to not mangle the passed in/out slotmem pointer on
failure.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831394 13f79535-47bb-0310-9956-ffa450edef68
2018-05-11 09:31:13 +00:00
c93e111a6a mod_slomem_shm: Handle a generation number when the slotmem size changes.
Modifying the number of proxy balancers or balancer members on restart
could have prevented the server to load, notably on Windows.  PR 62308.

The generation number integrated in the SHM filename allows to create a
new/resized SHM while the previous is still in use by previous generation
gracefully shutting down (Windows prevents SHM/file to be removed in this
case, but even on Unix(es) an unlinked file might not be re-openable while
an inode exists). The generation number is added/incremented only if the
size requirement changed, such that unrelated restarts continue to share
SHMs between generations.

The cleanup handling is also simplified because both the parent process and
the Windows child process need to cleanup everything on exit. This translates
to cleanup_slotmem() being always registered but in the dry load state
(AP_SQ_MS_CREATE_PRE_CONFIG), for both cases still.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1830800 13f79535-47bb-0310-9956-ffa450edef68
2018-05-03 08:32:42 +00:00
a78ffd288b mod_slotmem_shm: better comment on MPM WinNT specifics.
Also avoids registering a no-op cleanup for WinNT children.

No functional changes.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1826970 13f79535-47bb-0310-9956-ffa450edef68
2018-03-16 11:10:35 +00:00
0056a24d66 mod_slotmem_shm: SHMs need to be attached in MPM winnt children processes.
We can't (re-)create them since they exist already and are owned by the
parent process.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1826845 13f79535-47bb-0310-9956-ffa450edef68
2018-03-15 18:06:51 +00:00
25c1833e2f mod_slotmem_shm: follow up tp r1822509.
Fishy "unlink semantic" (description) does not apply anymore.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1823572 13f79535-47bb-0310-9956-ffa450edef68
2018-02-08 15:42:49 +00:00
9f8a7d55ca mod_slotmem_shm: follow up tp r1822509.
Complete layout of SHM and persited file (ascii art).
Simplify an "if" condition, no functional change.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1823416 13f79535-47bb-0310-9956-ffa450edef68
2018-02-06 23:43:41 +00:00
dfc538ce4e mod_slotmem_shm: follow up tp r1822509.
Do not bind attached slotmems to the global list, they should be detached with
the given pool (pchild) is cleaned up, but not destroyed/removed (doubly) with
pglobal.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1823415 13f79535-47bb-0310-9956-ffa450edef68
2018-02-06 23:37:25 +00:00
23c83331bc mod_slotmem_shm: follow up tp r1822509.
Check SHM sizes when reused, reload may have changed the needs.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1823412 13f79535-47bb-0310-9956-ffa450edef68
2018-02-06 23:30:41 +00:00
c75bda95cc mod_slotmem_shm: follow up tp r1822509.
Please buildbot (and incidentally users of older APR) by using
apr_shm_remove() instead of the new(er) apr_shm_delete().

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822511 13f79535-47bb-0310-9956-ffa450edef68
2018-01-29 14:43:21 +00:00
ea253a6373 mod_slotmem_shm: Rework SHM reuse/deletion.
To fix races with graceful restarts (PR 62044).

This commit does:
1/ use a constant file name for all systems (no generation suffix which
   makes a new SHM to be created for each restart, losing previous data)
2/ maintain the list of the created SHMs accross restarts (ap_pglobal list)
3/ not unlink the files on restart anymore (otherwise we can't reuse them)
4/ not attach existing SHMs in slotmem_create() anymore (not suitable since
   those are necessarily crash remainders)
5/ add type/sizes consistency check for persisted slots on restoration
6/ unlink the files only on stop/exit or before creating them (crash recovery)

We could possibly avoid 6/ (since we don't need to re-open files now) if we
remove the file just after the SHM is created.  This would at least work for
systems with "unlink semantic" (i.e. unlink succeeds even if some descriptors
are opened, the "real" thing happening when the last one desciptor closed), but
this wouldn't work for other systems so I kept the code generic for now.

[Reverted by r1831868]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822509 13f79535-47bb-0310-9956-ffa450edef68
2018-01-29 14:34:50 +00:00
5ff25379f5 Revert r1822341, slotmems are not reused on (graceful) restart.
Will follow up with an alternate fix.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822505 13f79535-47bb-0310-9956-ffa450edef68
2018-01-29 13:22:47 +00:00
c666c50bbf PR 62044: Force addition of generation number to shm filename on
all platforms. Keep persisted filename as-was.

[Reverted by r1822505]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822341 13f79535-47bb-0310-9956-ffa450edef68
2018-01-26 19:49:04 +00:00
d79b514c4b Fix spelling in comments and text files.
No functional change.
PR 59990


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
4bfe0a6bba Follow up to r1715880: revert more abusive ap_casecmpstr[n]() usages.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722150 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 15:32:27 +00:00
c80e6b2a34 Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715876 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:46:01 +00:00
3c9ddf44bf Revert r1715789: will re-commit without spurious functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715869 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:28:36 +00:00
29843dc73f Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
[Reverted by r1715869]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715789 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 12:33:09 +00:00
cda009d56a mod_slotmem_shm: follow up to r1702450.
Make systems without unlink() semantic happy by destroying (detaching) the SHM
before removing the base file.
Windows is supposed to have the "delete on last handle closed" semantic but yet
fails here when this handle is owned by the same process (go figure!).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1703169 13f79535-47bb-0310-9956-ffa450edef68
2015-09-15 12:24:24 +00:00
1e57700c31 mod_slotmem_shm: follow up to r1702450.
r1702450 changed the behaviour of slotmem_{create,attach}() when given
given an absolute (SHM file )name.
Don't mangle the SHM file name in this case, it's up to the caller to
provide a unique name per call when this matters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1703149 13f79535-47bb-0310-9956-ffa450edef68
2015-09-15 11:01:40 +00:00
58abe4c559 mod_slotmem_shm: revert frivolous s/name/fname/ from r1702473, keep the comments.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702955 13f79535-47bb-0310-9956-ffa450edef68
2015-09-14 14:04:19 +00:00
fa96de5f32 mod_slotmem_shm: follow up to r1702450.
Use the generation number from the MPM (AP_MPMQ_GENERATION) since
AP_SQ_CONFIG_GEN is irrelevent in non-forked MPMs children.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702501 13f79535-47bb-0310-9956-ffa450edef68
2015-09-11 15:30:16 +00:00
05a04f78f4 mod_slotmem_shm: follow up to r1702450.
Rename ap_slotmem_instance_t's field 'name' to 'fname' since it really stores
the file path/name of the file-based SHM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702473 13f79535-47bb-0310-9956-ffa450edef68
2015-09-11 13:58:44 +00:00
108a572d80 mod_slotmem_shm: Fix balancers and balancer members slots reuse on
restart when new ones are added (Windows and OS/2 only).  PR 58024.

Since Windows and OS/2 don't have the unlink() but the "delete on last close"
semantic for opened files being removed, we can't reuse the same SHM files
names for processes of different generation.  Let's append the generation
number in the files names for those.

This commit also axes unused Unix specifics about mutexes/semaphores.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702450 13f79535-47bb-0310-9956-ffa450edef68
2015-09-11 13:00:53 +00:00
e02d599d3a This 2 includes are not needed anymore.
They were added in r1542732.

The need of apr_version.h has been removed in r1561200.
The need of apr_hash.h has been removed in r1561211.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657965 13f79535-47bb-0310-9956-ffa450edef68
2015-02-06 21:14:29 +00:00
b8574b7140 These are more than debug errors...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621373 13f79535-47bb-0310-9956-ffa450edef68
2014-08-29 19:42:54 +00:00
1598eac14e follow-up to r1562472, 1561262, and 1561923:
Improve messaging...

* easier to tell what went wrong in some cases
* reduce number of debug messages without losing information in some cases


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1574151 13f79535-47bb-0310-9956-ffa450edef68
2014-03-04 17:45:36 +00:00
0027e12f44 More debugging
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1562472 13f79535-47bb-0310-9956-ffa450edef68
2014-01-29 15:10:08 +00:00
8308f88d58 c89 fix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561923 13f79535-47bb-0310-9956-ffa450edef68
2014-01-28 01:49:21 +00:00
075465f7e7 Remove wonky and unneeded code. We have access
cross forks, so child processes have access.

When we need true external access, this is something
that APR shm must provide. We should have no
knowledge of APR internals.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561385 13f79535-47bb-0310-9956-ffa450edef68
2014-01-25 20:11:50 +00:00
b6bc90c796 More debug messaging... useful for tracking down
if we used attach or create

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561262 13f79535-47bb-0310-9956-ffa450edef68
2014-01-25 06:06:54 +00:00
7f11f97354 not needed any longer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561242 13f79535-47bb-0310-9956-ffa450edef68
2014-01-25 01:14:58 +00:00
315cd74509 Revert to assuming APR uses ftok(..,1)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561211 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 22:10:12 +00:00
b98527874d Avoid APR check.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561200 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 21:40:35 +00:00
ec1e7e9ca0 Handle the gugz fix in APR 1.5.1 regarding duplicate
keys.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542732 13f79535-47bb-0310-9956-ffa450edef68
2013-11-17 14:22:58 +00:00
a26a8b2c68 Follow-up to r1540161:
The last arg to apr_file_write_full() isn't needed
unless you need to know the number of bytes written before
an error occurred.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542413 13f79535-47bb-0310-9956-ffa450edef68
2013-11-15 21:52:58 +00:00
7a0c59f66f Avoid the confusion... the digests are NOT strings.
Add some debug logging

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1540220 13f79535-47bb-0310-9956-ffa450edef68
2013-11-08 23:42:50 +00:00
51875adb6d If apr_file_read did return APR_EOF, then ensure that,
as long as we read the right number of bytes, we
return APR_SUCCESS

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1540179 13f79535-47bb-0310-9956-ffa450edef68
2013-11-08 20:51:44 +00:00
33ea79e4d7 Allow for backwards compatibility for the md5 check...
if we've read the slotmem data and we are at EOF, then
don't bother checking the md5 and assume all is OK.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1540178 13f79535-47bb-0310-9956-ffa450edef68
2013-11-08 20:48:16 +00:00