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

15735 Commits

Author SHA1 Message Date
Chris Darroch
e69f467709 Introduce a check_config phase between pre_config and open_logs,
to allow modules to review interdependent configuration directive
values and adjust them while messages can still be logged to the
console.

The open_logs phase is already used somewhat for this purpose by
certain MPMs (winnt, prefork, worker, and event) but only by forcing
their functions ahead of the core ap_open_logs() function, and
since this phase runs after the ap_signal_server function during startup,
it can not be used to generate messages on the console when restarting.

Add the check_config phase to mod_info and mod_example.

Handle relevant MPM directives during this phase and format messages
for both the console and the error log, as appropriate.  Bounds and sanity
checks on the values of the MPM directives are handled in sequence in
this phase instead of in the various directive handling functions, since
those functions (e.g., set_max_clients()) may not be called at all if their
directives do not appear in the configuration files, and even if they
are called, there is no guarantee that this will occur in any particular
order.

Remove from the worker and event MPMs the code in the pre_config phase
that alters the configuration node tree by re-ordering ThreadsPerChild
ahead of MaxClients.  This code is effective but insufficient; for
example, if ServerLimit follows MaxClients, the test against server_limit
in set_max_clients() is invalid.  (In practice, this only results in
incorrect or absent warnings on the console, because server_limit is
set to its configured value when the main loop re-runs the configuration
process.)

Prevent ap_threads_per_child from exceeding thread_limit in the
winnt, worker, and event MPMs.  This situation could occur if
ThreadsPerChild was not specified in the configuration files and
ThreadLimit was set to a value smaller than DEFAULT_THREADS_PER_CHILD,
because set_threads_per_child() would never be called and therefore
its bounds check against thread_limit would not be performed.

Remove from the winnt, prefork, worker, and event MPMs the
changed_limit_at_restart flag.  Set the first_server_limit and
first_thread_limit values during the first execution of the check_config
function, and use them to detect changes to ServerLimit and ThreadLimit
across restarts and issue appropriately formatted warnings.  Remove the
comments about the error log being a "bit bucket"; this was true when
the code was originally committed in r92530 but that was due to a bug
fixed in r92769.

Be consistent about setting all MPM configuration directive values in the
pre_config phase.

Rephrase and reformat the console and log file messages relating to
MPM configuration directives to be consistent across all MPMs.  Use
briefer messages when logging to the error log than to the console.

Update miscellaneous stale comments and messages (e.g., reference to
daemons_min_free in worker and event MPMs, "prefork open_logs" in
winnt MPM, and StartServers in netware MPM).

The winnt, netware, beos, and mpmt_os2 MPMs should be tested by developers
with access to those platforms, especially the winnt MPM, which has
unique logic with respect to distinguishing between parent and child
processes during the configuration phases.

Update the English documentation for the worker MPM's ThreadsPerChild
directive, which no longer needs to precede other MPM directives in the
configuration files if it has a non-default value.  The German (.de) and
Japanese (.ja) translations should be updated by developers fluent in
those languages.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@431460 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 22:55:45 +00:00
Nick Kew
4304af36d9 Note bugfix
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@431342 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 13:35:03 +00:00
Nick Kew
3b19271873 PR#37770: Don't try to use dead backend connection in proxy
(Patch from Olivier BOEL)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@431339 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 13:26:07 +00:00
Nick Kew
d160248d92 Fix tabs introduced in r429875
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429890 13f79535-47bb-0310-9956-ffa450edef68
2006-08-08 23:50:33 +00:00
Nick Kew
1e2d246c20 That proxy change was functional, even if it was just one character:-)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429883 13f79535-47bb-0310-9956-ffa450edef68
2006-08-08 23:33:21 +00:00
Nick Kew
047253e8a8 PR#38448: don't URLencode tilde in path component
On reflection, this patch makes sense (since the URL spec got updated), and it's trivial.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429879 13f79535-47bb-0310-9956-ffa450edef68
2006-08-08 23:27:25 +00:00
Nick Kew
537844367d Fix style (indentation at least) to apache style rules before reviewing top of this.
No functional change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429875 13f79535-47bb-0310-9956-ffa450edef68
2006-08-08 23:18:23 +00:00
William A. Rowe Jr
f4d7f73505 Observed by hunter - fix the cut n paste errors in some .res compilation
steps of the win32 build.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@429038 13f79535-47bb-0310-9956-ffa450edef68
2006-08-05 20:04:40 +00:00
Chris Pepper
d0566d6509 Document that httpd -L doesn't list shared modules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428941 13f79535-47bb-0310-9956-ffa450edef68
2006-08-05 02:53:59 +00:00
Bradley Nicholes
e6d2a7d4df revert the definitive bit for the reject directive.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428800 13f79535-47bb-0310-9956-ffa450edef68
2006-08-04 17:56:50 +00:00
Bradley Nicholes
7159a46f37 revert the reject directive is definitive patch and normalize the logic lists.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428798 13f79535-47bb-0310-9956-ffa450edef68
2006-08-04 17:53:27 +00:00
Jim Jagielski
3eeb5a123b Initialization change. Move to a different format
to force resets as well as a common technique, in case
_route is updated at some point.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428361 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 11:41:14 +00:00
Jim Jagielski
585f146b66 Reset standby flags for each loop through the cluster sets
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428352 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 11:30:11 +00:00
Joe Orton
b3265c64fb * modules/proxy/mod_proxy.c (proxysection): Fix another strchr() warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428291 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 09:33:35 +00:00
Mladen Turk
496195bdd8 Do not return on WAIT_ABANDONED signals.
It means that we got the ownership, not that the
object was signaled.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428278 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 08:24:44 +00:00
Bradley Nicholes
601c29aedc fix typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428163 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 21:50:08 +00:00
Ruediger Pluem
18748acaa6 * Followup patch on r427959:
Also substitute close_on_recycle with close in mod_proxy_fcgi. This makes
  mod_proxy_fcgi compile again.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428152 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 21:19:09 +00:00
Mladen Turk
36db918bc8 Fix return values from wait_for_many_objects.
The return value is index to the signaled thread in
the creted_threads array.
We can not use WAIT_TIMEOUT as return value
because its value is defined as 258, thus limiting
the MaxThreads to that value that leads to the
assertion errors.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428029 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 15:31:24 +00:00
Mladen Turk
a409ec8829 Revert the patch. Although the problem still exists
its root cause is inside the wait_for_many_objects.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428009 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 14:41:31 +00:00
Mladen Turk
da44990a05 Fix the assertion if the WaitForMutipleObjects
returns WAIT_ABANDONED_NN instead presumed
WAIT_OBJECT_NN. This will correctly close the thread
handle without using invalid thread handle array index.

Spotted when large balancer timeout was set
and all the threads were busy waiting for the
connection:
[Wed Aug 02 14:29:58 2006] [crit] [Wed Aug 02 14:29:58 2006] file \\build-2.2.2\\server\\mpm\\winnt\\child.c, line 1120, assertion "(rv >= 0) && (rv < threads_created)" failed


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428008 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 14:36:24 +00:00
Mladen Turk
9bbf36995e Cleanup: Remove close_on_recycle from proxy_conn_rec.
It behaves the same as close.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427959 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 12:03:42 +00:00
Mladen Turk
02c70cf77e Make sure the error signature is logged as double
hex byte.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427951 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 10:42:07 +00:00
Mladen Turk
78f6ef0859 Allow optional name=value options within <Proxy
section line. Additional arguments are allowed
only for 'standard' url's, meaning that the wildchar
urls will return error like before.
This allow to specify the worker/balancer parameters
on the definition line, without the need for extra
ProxySet options.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427928 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 07:59:47 +00:00
Mladen Turk
20a4dc5137 Enable ProxySet inside <Proxy> section to
create balancer or worker if they were not
already created.
This allows to have ProxySet directive before
BalancerMember directives inside Proxy section.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427920 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 06:54:01 +00:00
Bradley Nicholes
fecc476d87 fix a typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427783 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 23:05:48 +00:00
Bradley Nicholes
6b831e7059 Converted the reject directive to be definitive and enabled directory_merge to merge all of the authorization rules and logic.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427780 13f79535-47bb-0310-9956-ffa450edef68
2006-08-01 22:54:38 +00:00
Jim Jagielski
dc9255aabe Good catch by Ruediger
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427368 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 23:46:55 +00:00
Jim Jagielski
61a56451a3 Add in a very simple balancer "set" concept, which allows
for members to be assigned to a particular cluster set
such that members in lower-numbered sets are checked/used
before those in higher ones.

Also bundled in this are some HTML cleanups for the balancer
manager UI. Sorry for the mixins :)

Compiles/builds clean: passes test framework as well
as more normal usage tests ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427172 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 17:01:40 +00:00
Mladen Turk
7aa10a383a Fix compile time warning. AJP protocol method is byte.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427059 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 09:42:57 +00:00
Mladen Turk
0658003dba Cleanup: Remove checking for pre 2.0.46 MMN. It is
obvious that the new mod_proxy will never be
backported to the 2.0 branch.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427055 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 09:33:28 +00:00
Ruediger Pluem
2d63cb2faa * Rework inflate out filter and give it a similar workflow as the deflate out
filter. This fixes the following bugs in the inflate out filter:

  - Incorrect handling of flush buckets.
  - Excessive memory usage for large compressed content (because we now
    already sent parts down the chain and do not process the whole brigade
    first before sending something down the chain).
  - Handle the case correctly where the validation bytes at the end of
    the compressed data stream are distributed across different buckets /
    brigades.
  - Fix a memory leak due to not cleaning up the internal structures of
    libz in some error cases.

PR: 39854


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426799 13f79535-47bb-0310-9956-ffa450edef68
2006-07-29 13:24:37 +00:00
Ruediger Pluem
8526b8da4a * some optimizations taken from the inflate out filter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426795 13f79535-47bb-0310-9956-ffa450edef68
2006-07-29 13:08:38 +00:00
Ruediger Pluem
805eb59cda * We can ignore Z_BUF_ERROR in flush_libz_buffer because:
When we call libz_func we can assume that

   - avail_in is zero (due to the surrounding code that calls
     flush_libz_buffer)
   - avail_out is non zero due to the fact that we just emptied
     the output buffer and stored it into a brigade

  So the only reason for Z_BUF_ERROR is that the internal libz
  buffers are now empty and thus we called libz_func one time
  too often. This does not hurt. It simply says that we are done.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426793 13f79535-47bb-0310-9956-ffa450edef68
2006-07-29 13:03:43 +00:00
Ruediger Pluem
0649a455ad * Use a define for the number of validation bytes (CRC and length) after the
compressed data


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426791 13f79535-47bb-0310-9956-ffa450edef68
2006-07-29 12:55:26 +00:00
Ruediger Pluem
8ff28428b3 * Add parameter crc to flush_libz_buffer in order to call the libz's crc32
function on the output buffer if needed. This is actually needed by the
  later rework of the inflate out filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426790 13f79535-47bb-0310-9956-ffa450edef68
2006-07-29 12:49:51 +00:00
William A. Rowe Jr
fe385cf38f Wrong project name
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426142 13f79535-47bb-0310-9956-ffa450edef68
2006-07-27 17:05:59 +00:00
Mark J. Cox
862dd4e3e7 SECURITY: CVE-2006-3747 (cve.mitre.org)
mod_rewrite: Fix an off-by-one security problem in the ldap scheme
handling.  For some RewriteRules this could lead to a pointer being
written out of bounds.  Reported by Mark Dowd of McAfee.

Ack: trawick, lars, jorton, wrowe, benl



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426138 13f79535-47bb-0310-9956-ffa450edef68
2006-07-27 17:03:34 +00:00
Mladen Turk
79c25adcda Document new ping parameter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425999 13f79535-47bb-0310-9956-ffa450edef68
2006-07-27 08:09:02 +00:00
Ruediger Pluem
edfbb15c54 * Remove all filters that are before the cache_out filter. This ensures
that we kick off the filter stack with our cache_out filter being the
  first in the chain. This make sense because we want to restore things
  in the same manner as we saved them.
  There may be filters before our cache_out filter, because

  1. We call ap_set_content_type during cache_select. This causes
     Content-Type specific filters to be added.
  2. We call the insert_filter hook. This causes filters e.g. like
     the ones set with SetOutputFilter to be added.

PR: 40090


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425787 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 17:33:38 +00:00
Ruediger Pluem
2ab2a3a549 * Sync with 2.2.x CHANGES
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425742 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 14:24:32 +00:00
Ruediger Pluem
75661df549 * Sync with 2.2.x CHANGES file
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425728 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 13:13:19 +00:00
Mladen Turk
1bcb527a45 Add missing prototype for ajp_handle_cping_cpong function
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425690 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 09:25:19 +00:00
Nick Kew
4cac07297f Note backport
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425663 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 08:08:22 +00:00
Mladen Turk
98ff0f9c1b Add missing svn:eol-style native properties.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425648 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 07:15:32 +00:00
Jim Jagielski
723dc59333 remove BOM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425634 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 05:36:01 +00:00
Roy T. Fielding
399bc245dd Fix warning on Darwin 8.7.0 (OS X 10.4.7) due to the prototype for
sendfile_nonblocking being declared outside ifdefs even though the
function is defined and used only when APR_HAS_SENDFILE



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425571 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 00:40:53 +00:00
Mladen Turk
4487a05aa3 Adjust the svn properties.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425559 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 23:49:39 +00:00
Mladen Turk
282612fcc2 Add ajp_utils to the list of ajp objects.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425523 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 20:59:20 +00:00
Mladen Turk
4fd2c57da0 Added cping/cpong support for the AJP protocol.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425454 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 16:50:07 +00:00
Mladen Turk
fb43394819 Add mod_authz_core module to the build.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425433 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 15:59:43 +00:00