1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-11 02:42:23 +03:00
Commit Graph

491 Commits

Author SHA1 Message Date
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
Roy T. Fielding
ad2b92fe05 ap_meets_conditions() should not be called until all of
the known content metadata has been set, so that said metadata
can be included in the condition tests and in a 304 response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@743837 13f79535-47bb-0310-9956-ffa450edef68
2009-02-12 18:58:10 +00:00
Eric Covener
87e07a8396 Provide a hint when we see what looks like an SSL record when we're
expecting a plain-text request line.

Submitted by: Dan Poirer <poirier pobox.com>
Reviwed by: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739620 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:16:51 +00:00
Roy T. Fielding
421ee8b008 Disabled DefaultType directive and removed ap_default_type()
from core.  We now exclude Content-Type from responses for which
a media type has not been configured via mime.types, AddType,
ForceType, or some other mechanism.  MMN major bump to NZ time.

PR: 13986



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@739382 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 19:12:51 +00:00
William A. Rowe Jr
b3b8792867 Oh brother; we just dupped these to lowercase them, no need to re-dup again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733091 13f79535-47bb-0310-9956-ffa450edef68
2009-01-09 17:23:34 +00:00
William A. Rowe Jr
c86bb448bc Reorder and correct creation and merge of server records, optimizing
significantly for all of our null / 0 value defaults (we had always
palloc'ed, so this was very wasteful).

Corrects a segfault in 2.3.1-alpha candidate, which evaluated the
accf_map.  Due to the backwards construction of the merge (patched)
this was never initialized in virtual servers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@731067 13f79535-47bb-0310-9956-ffa450edef68
2009-01-03 19:17:14 +00:00
William A. Rowe Jr
75c893b05d Clean up fugly initialization of AcceptFilter mappings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@730835 13f79535-47bb-0310-9956-ffa450edef68
2009-01-02 20:08:59 +00:00
Ruediger Pluem
1848a50775 * The API Cleanup in r722399 missed some locations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722408 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 09:09:00 +00:00
Paul Querna
a73acf02f6 API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
Nick Kew
6a61e11758 Move security check to post_config, ćos pre-config hooks don´t
run in expected order.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@710108 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 17:24:56 +00:00
Nick Kew
a1252f96e3 Wrap the global count of privileges handlers operating. Silence grumblers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@710037 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 11:37:03 +00:00
Nick Kew
72119d92f5 Switch all unix MPMs to use drop_privileges hook (mod_unixd) for startup
and add a flag to prevent running without any module taking responsibility
for managing system privileges!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709993 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 00:46:54 +00:00
Chris Darroch
89e17a3d24 Allow <Limit> and <LimitExcept> directives to nest, and
constrain their use to conform with that of other access control
and authorization directives.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709551 13f79535-47bb-0310-9956-ffa450edef68
2008-10-31 20:10:07 +00:00
Paul Querna
485ed11102 * server/core.c: Fix implicit declaration of function 'unixd_set_rlimit' by
including unixd.h.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@708814 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 08:00:50 +00:00
Ruediger Pluem
f8e9c42a0d * Do not allow all options of ALL to be set when only a few of them are
allowed.

PR: 44262
Submitted by: Michał Grzędzicki <lazy iq.pl>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@652885 13f79535-47bb-0310-9956-ffa450edef68
2008-05-02 20:04:34 +00:00