Commit Graph

434 Commits

Author SHA1 Message Date
2aef21903c Cleanup... most don't need apr_hooks.h at all...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101067 13f79535-47bb-0310-9956-ffa450edef68
2011-05-09 15:36:32 +00:00
462c69e0b5 Add child_status hook for tracking creation/termination of MPM child
processes.  Add end_generation hook for notification when the last
MPM child of a generation exits.

end_generation is implemented completely by core using the
child_status hook run by the MPM.

simple and mpmt_os2 MPMs don't currently run the child_status
hook, so neither hook is invoked with those MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096609 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 21:21:22 +00:00
bf07c1867c Add new ap_reserve_module_slots/ap_reserve_module_slots_directive API,
necessary if a module (like mod_perl) registers additional modules later than the
EXEC_ON_READ phase.

Tested by: Torsten Foertsch <torsten foertsch gmx net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096569 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 19:22:04 +00:00
b510d83098 The pre_config hook should return int, not apr_status_t.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1095213 13f79535-47bb-0310-9956-ffa450edef68
2011-04-19 21:01:52 +00:00
621c77a0fd core: Support module names with colons in loglevel configuration.
Submitted by: Torsten Förtsch <torsten foertsch gmx net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090369 13f79535-47bb-0310-9956-ffa450edef68
2011-04-08 17:59:48 +00:00
6bd438fe64 Add in a configuration generation... this is independent of
MPM gen, just in case we ever switch MPMs at a graceful ;)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087331 13f79535-47bb-0310-9956-ffa450edef68
2011-03-31 15:12:09 +00:00
efb9ddbde7 match docs for case of "ScoreBoardFile"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086297 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 16:50:11 +00:00
5e3ba7d3ee mpm_common.c implements a handful of config directives; the
related state has to be re-initialized to the default values
at pre-config time, but that was handled inconsistently by
the MPMs, resulting in unexpected behavior when some of the
directives were removed across restart

move that necessary initialization from the MPMs to common 
code run from core's pre-config; MPMs that need to override
defaults can do so by running after core's pre-config (the 
NetWare MPM now does that)

the DEFAULT_MAX_REQUESTS_PER_CHILD compile setting wasn't useful
enough to keep

the simple MPM wasn't consistent in which of these directives
were respected and which weren't, and that hasn't changed
(see procmgr.max_requests_per_child vs. ap_max_requests_per_child)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086293 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 16:25:20 +00:00
fdaaf209c5 core: AllowEncodedSlashes new option NoDecode to allow encoded slashes
in request URL path info but not decode them. Change behavior of option
"On" to decode the encoded slashes as 2.0 and 2.2 do.  PR 35256,
PR 46830.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082196 13f79535-47bb-0310-9956-ffa450edef68
2011-03-16 16:45:25 +00:00
4598f1a7d4 fix some grammar mistakes, mostly in comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 00:35:39 +00:00
d6de9e9f67 Create new ap_state_query() function that allows modules to determine
if the current configuration run is the initial one at server startup,
and if the server is started for testing/config dumping only.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070151 13f79535-47bb-0310-9956-ffa450edef68
2011-02-12 21:18:32 +00:00
de9cd44921 * Only unset if we have a table. This can happen if undefine occurs before define.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1061669 13f79535-47bb-0310-9956-ffa450edef68
2011-01-21 08:01:09 +00:00
77ce7da768 Add support to set variables with the 'Define' directive. Change
ap_resolve_env() to look for variables defined in this way. This allows to use
the variables in the config using the ${VAR} syntax known from envvar
interpolation


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1061465 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 19:12:32 +00:00
58f17628ac Move ap_resolve_env to core.c, in preparation for adding mod_define-like
variable support.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1061444 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 18:37:47 +00:00
209d890731 Initialize the core_dir_config->sec_files and ->sec_if only if needed.
This saves some memory and two apr_array_append()s per directory merge.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060283 13f79535-47bb-0310-9956-ffa450edef68
2011-01-18 09:58:26 +00:00
df4e1648fd remove some redundant NULL assignments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060255 13f79535-47bb-0310-9956-ffa450edef68
2011-01-18 09:12:00 +00:00
a38d3c9e23 Merge the <If> sections in a separate step ap_if_walk, after ap_location_walk.
This makes <If> apply to all requests, not only to file base requests and
it allows to use <If> inside <Directory>, <Location>, and <Files> sections.

The merging of <If> sections always happens after the merging of <Location>
sections, even if the <If> section is embedded inside a <Directory> or
<Files> section.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1059867 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 11:02:38 +00:00
cd52e0e73a eliminate another var named 'c' which is not a conn_rec
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053954 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 17:46:06 +00:00
47fde5a7e8 Applying patch from PR 33078 (with slight changes to its return values)
This patch disallows the mixing of relative (+/-) and absolute Options where insensible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053375 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 15:56:46 +00:00
21e0a16abb Changing the default Options from All to FollowSymlinks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1052419 13f79535-47bb-0310-9956-ffa450edef68
2010-12-24 00:37:30 +00:00
676cc45e8b PR50349: Honor 'AcceptPathInfo OFF' during internal redirects,
such as per-directory mod_rewrite substitutions.   This would be left floating 
around in the request_rec with a pcalloc'ed value, so the core fixup
hook thought some module had overridden it.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1043023 13f79535-47bb-0310-9956-ffa450edef68
2010-12-07 13:06:22 +00:00
81ba030297 simplify ServerName check with apr_fnmatch_test()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042157 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 12:03:38 +00:00
6cea387b1f Remove useless 'const' to fix compiler warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042147 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 11:23:55 +00:00
f5d3a4c3f4 core: Fail startup when the argument to ServerName looks like a glob
or a regular expression instead of a hostname (*?[]).  PR 39863 

Submitted By: Rahul Nair <rahul.g.nair gmail.com>
Reviewed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042098 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 04:14:03 +00:00
c40fa87ce7 Log errors/infos during expression evaluation and associate the message
with the module that is calling ap_expr_exec()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037140 13f79535-47bb-0310-9956-ffa450edef68
2010-11-20 08:59:50 +00:00
f1527a397d When restarting, reset ap_server_config_defines to what was set on the command
line. This makes the result more predictable for the user and resolves some
string lifetime issues in the implementation of set_define/unset_define.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1033619 13f79535-47bb-0310-9956-ffa450edef68
2010-11-10 18:03:32 +00:00
66e4cc4676 Add Error directive for aborting startup or htaccess processing
with a specified error message.

Be nice and strip off any quotes, which aren't necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032565 13f79535-47bb-0310-9956-ffa450edef68
2010-11-08 13:15:17 +00:00
35cdba6976 Replace ap_expr with a parser derived from mod_ssl's parser. Make mod_ssl use
the new parser. Rework ap_expr's public interface and provide hooks for modules
to add variables and functions.

The Netware and Windows build files still need to be adjusted


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032073 13f79535-47bb-0310-9956-ffa450edef68
2010-11-06 14:31:16 +00:00
efb8c83d07 correction to r1031776, retain OR_UNSET with default AllowOverride None
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031794 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 21:00:18 +00:00
433c97df4e PR49823: Make the hardcoded default for AllowOverride match the default config -- None.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031776 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 20:21:09 +00:00
00cdb469d7 use temp pool in some more places
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026657 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 18:06:49 +00:00
5390992e03 Be extra careful to only pass the main server config to
ap_find_loaded_module_symbol. Fixes a segfault when using per-module
LogLevel on virtual host scope.

PR: 50117


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025702 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 19:53:57 +00:00
d5770e3da9 revert r1023227 as discussed on httpd-dev:
core: Log a warning if <Limit> or <LimitExcept> are used. They are
    deprecated and may go away in 2.4.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1024337 13f79535-47bb-0310-9956-ffa450edef68
2010-10-19 17:44:36 +00:00
c2ab8147b9 core: Log a warning if <Limit> or <LimitExcept> are used. They are
deprecated and may go away in 2.4.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023227 13f79535-47bb-0310-9956-ffa450edef68
2010-10-16 09:59:21 +00:00
5bcd082e3d Rename MaxRequestsPerChild to MaxConnectionsPerChild, which
describes more accurately what the directive does.

The old name still works but logs a warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021924 13f79535-47bb-0310-9956-ffa450edef68
2010-10-12 21:12:37 +00:00
affc4cf328 save some memory by using cmd->temp_pool instead of cmd->pool in some places
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002156 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 13:19:33 +00:00
b65066c6ac Add generate_log_id hook to allow to use the ID generated by mod_unique_id as
error log ID for requests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002125 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 11:53:17 +00:00
107c5573e1 In ErrorLogFormat, make it possible to log an item only if the loglevel
of the message is higher than a specified value. This allows to achive
the old behaviour for the source file name/line number of being only
logged for debug and higher.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1001381 13f79535-47bb-0310-9956-ffa450edef68
2010-09-26 07:40:15 +00:00
3ad914e110 - Add another check during ErrorLogFormat parsing
- Simplify code (including Ruediger's suggestions)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@993120 13f79535-47bb-0310-9956-ffa450edef68
2010-09-06 18:53:38 +00:00
70be0f7a07 Add ErrorLogFormat directive for configuring the error log format, including
additional information that is logged once per connection or request.

Add error log IDs for connections and request to allow correlating error log
lines and the corresponding access log entry.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992806 13f79535-47bb-0310-9956-ffa450edef68
2010-09-05 15:44:19 +00:00
a0e0e585b0 Disable sendfile by default, as discussed at
http://mail-archives.apache.org/mod_mbox/httpd-dev/201007.mbox/<4C4355EE.2060605@rowe-clan.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992689 13f79535-47bb-0310-9956-ffa450edef68
2010-09-04 21:53:06 +00:00
58570af105 Simplify code as noted by Jeff.
arg can't be NULL and the message created by missing_container_arg() is
good enough


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987860 13f79535-47bb-0310-9956-ffa450edef68
2010-08-22 10:26:18 +00:00
944257a98d Perform NULL check before dereferencing arg, not after.
PR: 49634


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986901 13f79535-47bb-0310-9956-ffa450edef68
2010-08-18 20:10:12 +00:00
0ce133f8a8 Intel's compiler warns about assigning the non-enum value 0 to the
enumeration apr_finfo_t.filetype, which is done when forgetting
the previously-derived file type

use the appropriate enum value APR_NOFILE instead

Also change comparisons of the field with 0 to use APR_NOFILE instead,
as is the practice of some existing code.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983065 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 17:36:52 +00:00
ec0051094a Move AddOutputFilterByType implementation from core to mod_filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@966869 13f79535-47bb-0310-9956-ffa450edef68
2010-07-22 21:54:39 +00:00
e9f4f3fd81 Trivial spelling fix so I can close
PR 44195


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@965712 13f79535-47bb-0310-9956-ffa450edef68
2010-07-20 01:55:18 +00:00
2334a1ea4f - Add loglevels to request_rec and conn_rec
- Introduce per-directory loglevel configuration


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951897 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:04:40 +00:00
98a1e93dca - Introduce log levels trace1/.../trace8
- Add macro wrappers for ap_log_*error. On C99, this will save argument
  preparation and function call overhead when a message is not logged
  because of the configured loglevel.
- Introduce per-module loglevel configuration.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951893 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:54:51 +00:00
5d4b85bc36 Move logic to find module by name into new function find_module().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951195 13f79535-47bb-0310-9956-ffa450edef68
2010-06-03 23:00:53 +00:00
c7b73b77d0 * Fix compiler warning on 64 bit systems (cast from pointer to integer of different size)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@931794 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 06:45:34 +00:00