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
Stefan Fritsch
92e366007c
Add lots of unique tags to error log messages
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Graham Leggett
394e5594d6
Introduce a per connection "peer_ip" and a per request "client_ip" to
...
distinguish between the raw IP address of the connection and the effective
IP address of the request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206291 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:42:04 +00:00
Stefan Fritsch
40ac38ff05
Remove MPM-private stuff from conn_state_t
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204104 13f79535-47bb-0310-9956-ffa450edef68
2011-11-19 23:35:46 +00:00
Greg Ames
f380e0c8ab
ap_core_translate: factor out duplicate code. no functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1202236 13f79535-47bb-0310-9956-ffa450edef68
2011-11-15 15:20:38 +00:00
Jeff Trawick
5405226ae2
end-generation hook: Fix false notification of end-of-generation for
...
temporary intervals with no active MPM children.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200449 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 17:46:57 +00:00
Jeff Trawick
239e4c0466
config generation # (reported by ap_state_query(AP_SQ_CONFIG_GEN):
...
* start at 0 instead of 1
* don't increment until after pconf cleanups run, in case a
cleanup needs to check the related config generation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200147 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 04:52:52 +00:00
Stefan Fritsch
44cd57149b
fix typo
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199528 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 23:27:52 +00:00
Stefan Fritsch
b791885bad
Only init the RNG once at startup. This saves some entropy and works around the APR bug
...
fixed in r1198921
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198930 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 20:57:02 +00:00
Stefan Fritsch
7c5a4c2bc9
Call apr_random_after_fork() manually in the child processes because the MPMs
...
use plain fork() and not apr_proc_fork().
Also add some workaround for APR not changing the RNG state in the parent.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198868 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 18:46:47 +00:00
Stefan Fritsch
0ddfb3e6cc
Add -D DUMP_RUN_CFG option to dump some configuration items
...
from the parsed (or default) config. This is useful for init scripts that
need to setup temporary directories and permissions, for example if those
temporary directories are located on a ram disk.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180681 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 18:35:23 +00:00
Stefan Fritsch
a216c436c6
Downgrade error log messages which accompany a 404 request status from loglevel
...
error to info.
List thread at
http://mail-archives.apache.org/mod_mbox/httpd-dev/201110.mbox/%3Calpine.DEB.2.00.1110041948280.664@eru.sfritsch.de%3E
PR: 35768
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180328 13f79535-47bb-0310-9956-ffa450edef68
2011-10-08 07:36:56 +00:00
Stefan Fritsch
1951a037bf
More cleanup: Expand tabs and some more indentation fixes
...
No functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00