1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

405 Commits

Author SHA1 Message Date
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
Ruediger Pluem
2a8cb24343 * Fix for the following configuration where the exec command was disabled
in /subdir. All CVE-2009-1195 tests still pass with this patch.

# only two containers in the config

<Directory />
Options Includes
AllowOverride None
</Directory>

<Directory /subdir>
# with this container, mod_cgi/mod_cgid complains about exec being off
# without it, exec cmd= works as expected
SetEnv foo bar
</Directory>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@773322 13f79535-47bb-0310-9956-ffa450edef68
2009-05-10 10:31:35 +00:00
Joe Orton
489bc420dd Security fix for CVE-2009-1195: fix Options handling such that
'AllowOverride Options=IncludesNoExec' does not permit Includes with
exec= enabled to be configured in an .htaccess file:

* include/http_core.h: Change semantics of Includes/IncludeNoExec
  options bits to be additive; OPT_INCLUDES now means SSI is enabled
  without exec=.  OPT_INCLUDES|OPT_INC_WITH_EXEC means SSI is enabled
  with exec=.

* server/core.c (create_core_dir_config): Remove defunct OPT_INCNOEXEC
  from default override_opts; no functional change.
  (merge_core_dir_configs): Update logic to ensure that exec= is
  disabled in a context where IncludesNoexec is configured, even if
  Includes-with-exec is permitted in the inherited options set.
  (set_allow_opts, set_options): Update to reflect new semantics
  of OPT_INCLUDES, OPT_INC_WITH_EXEC.

* server/config.c: Update to remove OPT_INCNOEXEC from default 
  override_opts; no functional change.

* modules/filters/mod_include.c (includes_filter): Update to reflect
  new options semantics - disable exec= support if the
  OPT_INC_WITH_EXEC bit is not set.

Submitted by: Jonathan Peatfield <j.s.peatfield damtp.cam.ac.uk>,
          jorton
Thanks to: Vincent Danon <vdanon redhat.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@772997 13f79535-47bb-0310-9956-ffa450edef68
2009-05-08 14:13:15 +00:00
Jeff Trawick
a1908585a8 Core can specify a platform-specific rewrite args hook. Use that on Unix.
Windows continues to specify this in the MPM, at least until someone
can separate out the MPM-specific bits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759699 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 14:41:02 +00:00
Jeff Trawick
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
Jeff Trawick
f2aefa329b restore disable-nagle logic for connected sockets
Note: Prior to the MPM-as-DSO churn, the following MPMs did not enable this logic:

  WinNT       APR supports no-oping the setsockopt() based on inheriting Nagle from the 
              listening socket on this platform, so the new APR call will be a no-op.
  simple      same as WinNT for at least some Unix-y platforms
  BeOS        shrug



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758696 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 15:43:46 +00:00
Jeff Trawick
7720a70dc4 axe the remaining checks of AP_MPM_WANT_foo to see what code to generate
MPMs no longer provide those definitions

(the signal server support is an interesting problem, since it has to be known before loading
loading the MPM)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758014 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:52:10 +00:00
Jeff Trawick
e0eb7d1eef Introduce a new set of APIs to allow MPMs to be proper modules instead
of integral parts which share global variables, functions, and macros
with the rest of httpd.

Converted now:
  prefork, worker, event, simple, WinNT*

*WinNT hasn't been built or tested, and relies on a hack to include the
WinNT mpm.h to disable Unixy MPM support routines in mpm_common.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757853 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 15:43:59 +00:00