1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-14 01:22:37 +03:00
Commit Graph

513 Commits

Author SHA1 Message Date
Christophe Jaillet
a41155663a Remove APLOG_NOERRNO.
This was intoduced in r1418677.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612469 13f79535-47bb-0310-9956-ffa450edef68
2014-07-22 05:37:12 +00:00
Eric Covener
8cc5e00f9e *) SECURITY: CVE-2013-5704 (cve.mitre.org)
core: HTTP trailers could be used to replace HTTP headers
     late during request processing, potentially undoing or
     otherwise confusing modules that examined or modified
     request headers earlier.  Adds "MergeTrailers" directive to restore
     legacy behavior.  

Submitted By: Edward Lu, Yann Ylavic, Joe Orton, Eric Covener
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610814 13f79535-47bb-0310-9956-ffa450edef68
2014-07-15 19:11:02 +00:00
Jim Jagielski
abb4760f84 typo
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565763 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 18:56:49 +00:00
Jim Jagielski
ea4859bfb1 Oops... missed this when I switched slaves to their
own struct (for ease of use w/ arrays)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565717 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 16:44:57 +00:00
Jim Jagielski
b122567955 Add in the concept of "slave" connections...
Allows for several "connections" all resulting in
a single real connection that talks to the network.
Right now, nothing uses this though.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1565657 13f79535-47bb-0310-9956-ffa450edef68
2014-02-07 13:54:38 +00:00
Jim Jagielski
3da00d392d just put up w/ the error message... no real way to
do this :/

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561184 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 21:16:54 +00:00
Jim Jagielski
0311d6aeb4 Use simple macro ifdef rather than APR versioning...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561150 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 20:24:36 +00:00
Jim Jagielski
f725b1e105 If we try to set this on a UDS socket, don't log the error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1561109 13f79535-47bb-0310-9956-ffa450edef68
2014-01-24 18:53:15 +00:00
Graham Leggett
4fecd089c4 Add a "MATCH_" prefix to variables set within
LocationMatch/DirectoryMatch/FilesMatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555266 13f79535-47bb-0310-9956-ffa450edef68
2014-01-03 22:26:55 +00:00
Justin Erenkrantz
93143eb07b Add directives to control two protocol options:
HttpContentLengthHeadZero - allow Content-Length of 0 to be returned on HEAD
 HttpExpectStrict - allow admin to control whether we must see "100-continue"

This is helpful when using Ceph's radosgw and httpd.

Inspired by: Yehuda Sadeh <yehuda@inktank.com>
See https://github.com/ceph/apache2/commits/precise

* include/http_core.h
  (core_server_config): Add http_cl_head_zero and http_expect_strict fields.
* modules/http/http_filters.c
  (ap_http_header_filter): Only clear out the C-L if http_cl_head_zero is not
  explictly set.
* server/core.c
  (merge_core_server_configs): Add new fields.
  (set_cl_head_zero, set_expect_strict): New config helpers.
  (HttpContentLengthHeadZero, HttpExpectStrict): Declare new directives.
* server/protocol.c
  (ap_read_request): Allow http_expect_strict to control if we return 417.
* include/ap_mmn.h
  (MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR): Bump.
* CHANGES: Add a brief description.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554303 13f79535-47bb-0310-9956-ffa450edef68
2013-12-30 20:01:14 +00:00
Graham Leggett
43e022f007 core: Support named groups and backreferences within the LocationMatch,
DirectoryMatch, FilesMatch and ProxyMatch directives.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1554300 13f79535-47bb-0310-9956-ffa450edef68
2013-12-30 19:50:52 +00:00
Jan Kaluža
452c223fe6 Add parse_errorlog_arg callback to ap_errorlog_provider to allow providers
to check the ErrorLog argument. Implement this check in mod_syslog.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1541029 13f79535-47bb-0310-9956-ffa450edef68
2013-11-12 12:14:50 +00:00
Jan Kaluža
59bb55791e Add ap_errorlog_provider to make ErrorLog logging modular. Move
syslog support from core to new mod_syslog.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525597 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 14:02:27 +00:00
Jeff Trawick
63617dc6f8 tweak syntax strings for ServerTokens
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1514267 13f79535-47bb-0310-9956-ffa450edef68
2013-08-15 13:37:08 +00:00
Jeff Trawick
f593f2a94a follow-up to r813376:
finish reverting r808965 (ServerTokens set foo)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1514255 13f79535-47bb-0310-9956-ffa450edef68
2013-08-15 13:18:50 +00:00
Joe Orton
55a3f5c336 * server/core.c (set_document_root): Improve error message for
inaccessible docroot.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1506474 13f79535-47bb-0310-9956-ffa450edef68
2013-07-24 09:51:14 +00:00
Stefan Fritsch
a011e2a43f Replace pre_htaccess hook with more flexible open_htaccess hook
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1498880 13f79535-47bb-0310-9956-ffa450edef68
2013-07-02 11:26:41 +00:00
Eric Covener
286e82c27d *) core: merge AllowEncodedSlashes from the base configuration into
(non-default) name-based virtual hosts. [Eric Covener]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1496339 13f79535-47bb-0310-9956-ffa450edef68
2013-06-25 02:48:25 +00:00
Eric Covener
e8bbbe9987 PR55069 include line number in 'AH00113: cannot use a full URL in a 401 ErrorDocument'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1490446 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 21:18:23 +00:00
Stefan Fritsch
7f40d2e002 Add workaround for gcc bug on sparc/64bit
PR: 52900


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470183 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 16:23:57 +00:00
Christophe Jaillet
318ce8d81b Make the "default" parameter of the "ErrorDocument " option case insensitive.
PR 54419 reported by Tianyin Xu [tixu cs ucsd edu]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1465190 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 05:34:07 +00:00
Christophe Jaillet
78d5fbc8f8 Fix incomplete filename in ErrorLog when trying to access files in non existing directories
PR39944

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1442412 13f79535-47bb-0310-9956-ffa450edef68
2013-02-04 22:46:10 +00:00
Stefan Fritsch
f726113d33 Add an option to enforce stricter HTTP conformance
This is a first stab, the checks will likely have to be revised.
For now, we check

 * if the request line contains control characters
 * if the request uri has fragment or username/password
 * that the request method is standard or registered with RegisterHttpMethod
 * that the request protocol is of the form HTTP/[1-9]+.[0-9]+,
   or missing for 0.9
 * if there is garbage in the request line after the protocol
 * if any request header contains control characters
 * if any request header has an empty name
 * for the host name in the URL or Host header:
   - if an IPv4 dotted decimal address: Reject octal or hex values, require
     exactly four parts
   - if a DNS host name: Reject non-alphanumeric characters besides '.' and
     '-'. As a side effect, this rejects multiple Host headers.
 * if any response header contains control characters
 * if any response header has an empty name
 * that the Location response header (if present) has a valid scheme and is
   absolute

If we have a host name both from the URL and the Host header, we replace the
Host header with the value from the URL to enforce RFC conformance.

There is a log-only mode, but the loglevels of the logged messages need some
thought/work. Currently, the  checks for incoming data log for 'core' and the
checks for outgoing data log for 'http'. Maybe we need a way to configure the
loglevels separately from the core/http loglevels.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1426877 13f79535-47bb-0310-9956-ffa450edef68
2012-12-30 01:23:24 +00:00
Stefan Fritsch
b5c0966006 Change HttpProtocol to again only allow to enable/disable 0.9
This reverts r1407643, but changes the syntax of HttpProtocol to
min=0.9|1.0, which is less ambiguous than the previous +0.9|-0.9.
    
Allowing to configure an arbitrary version range was a bad idea,
because it only checked the version in the request line, without
affecting the semantics of the headers, etc.
    
A tighter restriction off the version in the request line is still
possible with <If "%{SERVER_PROTOCOL_NUM} ..."> .


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1425366 13f79535-47bb-0310-9956-ffa450edef68
2012-12-22 22:55:38 +00:00
Stefan Fritsch
d04d01c589 Add LogLevelOverride directive that allows to override the loglevel for
clients from certain IPs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418767 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 22:16:31 +00:00
Fabien Coelho
310a0975a5 remove C99 features from 'Warning' directive handling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418734 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 19:06:50 +00:00
Fabien Coelho
0886d3fcaf Add minor 'Warning' directive as defined in current mod_macro.
* server/core.c: add 'Warning' directive by extending the 'Error'
  directive implementation. The 'Error' behavior is slightly changed
  so as to use verbose ap_log_error instead of returning the message.
* docs/manual/mod/core.xml: add documentation for 'Warning'.
* server/config.c: add comment about syntax vs configuration errors.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418677 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 14:49:09 +00:00
Stefan Fritsch
8a6add5f37 Sort error message for ServerTokens by increasing verbosity. Add missing 'OS'
variant.

Remove some trailing whitespace.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1416150 13f79535-47bb-0310-9956-ffa450edef68
2012-12-02 10:33:27 +00:00
Eric Covener
ddabe66f5e PR54222: catch invalid ServerTokens args
Submitted by: Jackie Zhang  <jackie.qq.zhang gmail.com>
Reviewed/modified by: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1415008 13f79535-47bb-0310-9956-ffa450edef68
2012-11-29 00:24:44 +00:00
Stefan Fritsch
b5a7699209 Make HttpProtocol accept a range of allowed versions.
Bump MMN


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407643 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 21:17:04 +00:00
Stefan Fritsch
f9d96c89db Expose ap_method_register() to the admin with a new RegisterHttpMethod
directive.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407599 13f79535-47bb-0310-9956-ffa450edef68
2012-11-09 19:38:19 +00:00
Stefan Fritsch
c083c06191 New directive HttpProtocol which allows to disable HTTP/0.9 support.
The syntax is designed to allow addition of a +/- strict option
later on.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1406719 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 16:56:38 +00:00
Stefan Fritsch
289ead8ef7 Make ap_check_cmd_context() treat <If> sections like <File> sections.
This is necessary to properly disallow directives that don't work in
<If>.
    
A separate NOT_IN_IF flag may be nicer, but would create much more
hassle when being backported to 2.4.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1406495 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 08:33:05 +00:00
Stefan Fritsch
0d734757ab Make <If> sections in virtual host context fill in cmd->path so that
other directive notice that they are in a config section.
    
This fixes LogLevel not working in <If> sections that are not in
Location/Directory/File sections.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1406493 13f79535-47bb-0310-9956-ffa450edef68
2012-11-07 08:29:49 +00:00
Jeff Trawick
9105fe3d46 add dirwalk_stat hook, for use by mpm-itk
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1388447 13f79535-47bb-0310-9956-ffa450edef68
2012-09-21 11:59:06 +00:00
Jeff Trawick
37d741a9ab core: Respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR for the
scoreboard (ScoreBoardFile).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369477 13f79535-47bb-0310-9956-ffa450edef68
2012-08-04 21:40:08 +00:00
Stefan Fritsch
8c960a8c15 Various code clean up
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 52893 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1361801 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 21:14:00 +00:00
Eric Covener
4e21f3952f r1052419 changed the default value of Options to FollowSymlinks,
but inadvertently made "AllowOverride Options" behave like 
"AllowOverride Options=FollowSymLinks".

PR53444


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1359976 13f79535-47bb-0310-9956-ffa450edef68
2012-07-11 01:48:48 +00:00
Stefan Fritsch
5b0c08477f Fix merging of AllowOverrideList and ContentDigest.
Remove some useless code.
Pointed out by covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1304852 13f79535-47bb-0310-9956-ffa450edef68
2012-03-24 16:32:53 +00:00
Stefan Fritsch
285bd508ef Disallow directives in AllowOverrideList which are only allowed
in VirtualHost or server context. These are usually not prepared to be
called in .htaccess files.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1302665 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 21:34:03 +00:00
Stefan Fritsch
c9fa20fb10 In AllowOverrideList, do not allow 'None' together with other directives.
While there, improve log messages and save some memory by allocating correct
size for table.

PR 52823


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1302653 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 20:57:19 +00:00
Stefan Fritsch
03a8b1b4c2 Fix some typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1300766 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 22:21:50 +00:00
Jim Jagielski
fc1b444d2e Fold on Jeff's DefaultRuntimeDir impl... docs on the way
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1297955 13f79535-47bb-0310-9956-ffa450edef68
2012-03-07 12:31:58 +00:00
Stefan Fritsch
1bbff8f19b Replace ap_create_core_ctx()/ap_core_ctx_get_bb() with a hook
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1240470 13f79535-47bb-0310-9956-ffa450edef68
2012-02-04 09:44:19 +00:00
Nick Kew
e0ddfe0fdf Core configuration: add AllowOverride option to treat syntax
errors in .htaccess as non-fatal.
PR 52439



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1229021 13f79535-47bb-0310-9956-ffa450edef68
2012-01-09 04:01:06 +00:00
William A. Rowe Jr
2aa21a62b1 Clean up size_t abuse, part 2. ap_malloc/calloc/realloc are explicitly
excluded from this cleanup as they must be signature identical to the
clib functions, and although the definition of size_t has been flakey,
the definition of those functions appears to be generally clean since
ANSI C.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1228323 13f79535-47bb-0310-9956-ffa450edef68
2012-01-06 18:15:08 +00:00
Stefan Fritsch
7f188926f7 Fix handling of piped, syslog, or inherited ErrorLog entries
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1225223 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 16:33:11 +00:00
Stefan Fritsch
4a62372445 Check during configtest that the directories for error logs exist
Testing under Windows is welcome

PR: 29941 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1225199 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 14:54:49 +00:00
Stefan Fritsch
70cfa8d396 Fix -DDUMP_RUN_CFG output for piped and syslog loggers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1225198 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 14:50:44 +00:00
Graham Leggett
cb21a0dbcc Further clarify the naming of the entity that directly connects to us by
calling that entity a client instead of a peer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214015 13f79535-47bb-0310-9956-ffa450edef68
2011-12-14 01:10:52 +00:00