1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

462 Commits

Author SHA1 Message Date
Stefan Fritsch
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
Eric Covener
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
Stefan Fritsch
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
Stefan Fritsch
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
Jeff Trawick
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
Stefan Fritsch
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
Eric Covener
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
Eric Covener
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Jeff Trawick
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
Nick Kew
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
Nick Kew
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
Stefan Fritsch
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
Stefan Fritsch
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
Stefan Fritsch
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
Ruediger Pluem
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
William A. Rowe Jr
1108773c08 First order simplification; Add IncludeOptional for introducing
wildcard pattern matches or specific includes which may be omitted.
Refactors ap_process_resource_config() to deal efficiently with 
a single file, and renames the new _ex() flavor per list discussion
to  ap_process_fnmatch_configs() for wildcard processing.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@931435 13f79535-47bb-0310-9956-ffa450edef68
2010-04-07 04:51:46 +00:00
Graham Leggett
3915fb380b Retract veto over inconsistent behaviour between directory and file wildcards,
implement wrowe's missing directory wilcard must fail / missing file wildcard
must pass requirement. Introduce 'optional' and 'strict' modifiers to the
Include directive for the end user to express their desired behaviour.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@929318 13f79535-47bb-0310-9956-ffa450edef68
2010-03-30 22:14:24 +00:00
Graham Leggett
ea767fff9d core: Introduce the IncludeStrict directive, which explicitly fails
server startup if no files or directories match a wildcard path.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@928916 13f79535-47bb-0310-9956-ffa450edef68
2010-03-29 22:09:35 +00:00
Jeff Trawick
16058fa112 comment only: fix name of hook and try to reword for clarity
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@912667 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 17:18:33 +00:00
Jeff Trawick
ec56aba06f Fix startup segfault when the Mutex directive is used but no loaded
modules use httpd mutexes.

Add an init call from core's pre-config hook to ensure init is
performed before the config is parsed.

PR: 48787


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@912666 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 17:16:29 +00:00
Stefan Fritsch
bb616ddda3 Print directive name in error message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@907012 13f79535-47bb-0310-9956-ffa450edef68
2010-02-05 17:38:08 +00:00
Ruediger Pluem
262c4164d2 * Use loglevel value for parsing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@905546 13f79535-47bb-0310-9956-ffa450edef68
2010-02-02 08:59:15 +00:00
Stefan Fritsch
60821a3b74 replace duplicate code with new function ap_parse_log_level()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@905454 13f79535-47bb-0310-9956-ffa450edef68
2010-02-01 23:27:32 +00:00
Stefan Fritsch
6856b147a7 Replace the Define !FOO syntax by a new UnDefine directive.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@904853 13f79535-47bb-0310-9956-ffa450edef68
2010-01-30 19:22:41 +00:00
Stefan Fritsch
2d507c2fcd Allow the Define directive to undefine a variable by prefixing the
argument with a '!'.

PR: 35350


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@904768 13f79535-47bb-0310-9956-ffa450edef68
2010-01-30 12:18:18 +00:00
William A. Rowe Jr
78cf8c9212 Refactor mod_status out of the ExtendedStatus toggle picture, as other
modules can and should be able to use this scoreboard information.
Rename suggestions for such a directive are welcomed.

Note that mod_status toggles the default, to present the ExtendedStatus 
for server operators, whenever it is loaded.  Docs changes to follow.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903020 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 00:05:37 +00:00
William A. Rowe Jr
27a6babb71 Design error; main.c is not part of the libhttpd, you can't forward
referrence storage like this.  Move the variable allocation into the
ap_ library module.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@901557 13f79535-47bb-0310-9956-ffa450edef68
2010-01-21 06:31:47 +00:00
Stefan Fritsch
3560f2e015 Turn static function get_server_name_for_url() into public function
ap_get_server_name_for_url() and use it where appropriate. This fixes
mod_rewrite generating invalid URLs for redirects to IPv6 literal addresses.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@900022 13f79535-47bb-0310-9956-ffa450edef68
2010-01-16 20:32:09 +00:00
Takashi Sato
0534f5f339 Fix string constness to get rid of gcc compiler warnings by -Wwrite-strings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894368 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 12:34:26 +00:00
Nick Kew
71702c45ac (re)-introduce -T commandline option to suppress documentroot check at startup
PR 41887
Patch by Jan van den Berg


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@893027 13f79535-47bb-0310-9956-ffa450edef68
2009-12-21 23:26:00 +00:00
Jeff Trawick
13cb638cbd Add OmitPID keyword on Mutex directive to suppress the
addition of the parent pid to the generated lock file
name.

Change the Mutex directive syntax from

  Mutex default|mutex-name mechanism

to

  Mutex mechanism [default|mutex-name] ... [OmitPID]

as suggested by wrowe.  (Thanks!)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@886154 13f79535-47bb-0310-9956-ffa450edef68
2009-12-02 14:24:18 +00:00
Jeff Trawick
2e9668a33d Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
and WatchdogMutexPath with a single Mutex directive.  Add APIs to
simplify setup and user customization of APR proc and global mutexes.  
(See util_mutex.h.)  Build-time setting DEFAULT_LOCKFILE is no longer
respected; set DEFAULT_REL_RUNTIMEDIR instead.

Some existing modules, such as mod_ldap and mod_auth_digest gain 
configurability for their mutexes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883540 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:17:51 +00:00
Jim Jagielski
b4abb43073 veto-ed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@813376 13f79535-47bb-0310-9956-ffa450edef68
2009-09-10 11:39:03 +00:00
Jim Jagielski
4cffc0e157 And additional ServerTokens improvement...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@808965 13f79535-47bb-0310-9956-ffa450edef68
2009-08-28 17:37:12 +00:00
Jim Jagielski
7fe574e381 OK, might as well finish this... Allow ServerTokens Off
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@808895 13f79535-47bb-0310-9956-ffa450edef68
2009-08-28 14:31:00 +00:00
Brian Havard
60fbe11de1 Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 08:56:13 +00:00
Joe Orton
cb56fba0f1 * server/core.c (merge_core_dir_configs): Tweak logic and comment
wording in the special-case for Includes merging such that the code
  and comment read the same.  No functional change (intended!).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@773342 13f79535-47bb-0310-9956-ffa450edef68
2009-05-10 14:18:39 +00:00