1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

3737 Commits

Author SHA1 Message Date
Paul Querna
548f0febab Remove AP_MODE_INIT, it is a no-op, everywhere
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/input-filter-dev@1200612 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 22:55:06 +00:00
Paul Querna
c37300112c Fix spelling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200456 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 18:05:47 +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
Jeff Trawick
00b4adb3b1 revert accidental commit 1200129
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200140 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 04:19:21 +00:00
Jeff Trawick
3c7b587593 clean up unused ap_my_generation variable
(presence is odd, since this variable as an API was supposedly removed
  long ago, and a similarly named static variable was removed in r1078286)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200132 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 04:13:16 +00:00
Jeff Trawick
e4f5c7198e clean up unused ap_my_generation variable
(presence is odd, since this variable as an API was supposedly removed
  long ago, and a similarly named static variable was removed in r1078286)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200129 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 04:10:42 +00:00
Stefan Fritsch
3095a74384 Downgrade log message which is triggered when client disconnects
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200033 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:19:06 +00:00
Stefan Fritsch
4a69a843de Fix per-request / per-conn logging, probably broken by r1041140
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199591 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 01:36:19 +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
fd962221ea Fix integer overflow in ap_pregsub. This can be triggered e.g.
with mod_setenvif via a malicious .htaccess

CVE-2011-3607
http://www.halfdog.net/Security/2011/ApacheModSetEnvIfIntegerOverflow/


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198940 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:13:40 +00:00
Stefan Fritsch
05eb254d1b No need to zero memory that we will overwrite anyway
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198934 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 21:04:40 +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
Jim Jagielski
95ced96d65 Remove magic numbers; ensure that an invalid nmatch is corrected
tagged

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1194912 13f79535-47bb-0310-9956-ffa450edef68
2011-10-29 16:07:16 +00:00
Graham Leggett
b84938b043 mod_include: Add support for application/x-www-form-urlencoded encoding
and decoding.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1194870 13f79535-47bb-0310-9956-ffa450edef68
2011-10-29 11:13:37 +00:00
Stefan Fritsch
308d06fd8d Improve handling of maxlen = APR_SIZE_MAX, noticed by Jim.
Use apr_pregsub_ex() and maxlen = 0 for unlimited in mod_substitute.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1189985 13f79535-47bb-0310-9956-ffa450edef68
2011-10-27 20:15:36 +00:00
Stefan Fritsch
340375975a Add comment why the code is disabled
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1188951 13f79535-47bb-0310-9956-ffa450edef68
2011-10-25 22:32:22 +00:00
Stefan Fritsch
04ca93ecff Limit ap_pregsub() to 64K, add ap_pregsub_ex() for longer strings and with
better error reporting. Modify ap_varbuf_regsub() to be similar to
ap_pregsub_ex().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1188950 13f79535-47bb-0310-9956-ffa450edef68
2011-10-25 22:29:13 +00:00
Ruediger Pluem
71fefb6951 * Correctly return a 400 (Bad request) in case of a HTTP/0.9 request like
GET @example.org/foo


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1188745 13f79535-47bb-0310-9956-ffa450edef68
2011-10-25 15:56:08 +00:00
Stefan Fritsch
eececab6db Comment out some incomplete code that does nothing but produce a compiler
warning


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1186545 13f79535-47bb-0310-9956-ffa450edef68
2011-10-19 22:40:06 +00:00
Stefan Fritsch
02302c9049 regex related cleanups:
- use AP_MAX_REG_MATCH where appropriate
- in mod_proxy_ftp, compile the "ls -s1" regex only once instead of once per request
- add some coments


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1185898 13f79535-47bb-0310-9956-ffa450edef68
2011-10-18 22:02:26 +00:00
Stefan Fritsch
c75f86b0c7 Downgrade some more log messages indicating client errors from level error to
info. Add log messages for various reasons to return HTTP_BAD_REQUEST.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1185385 13f79535-47bb-0310-9956-ffa450edef68
2011-10-17 21:30:40 +00:00
Eric Covener
95457d4698 flip operator in comment for r1182887 and add some whitespace
to highlight the restriction on nmatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1183007 13f79535-47bb-0310-9956-ffa450edef68
2011-10-13 17:41:41 +00:00
Jim Jagielski
2632a97856 Force the honoring of AP_MAX_REG_MATCH
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1182887 13f79535-47bb-0310-9956-ffa450edef68
2011-10-13 14:49:39 +00:00
Stefan Fritsch
f6982bf4c5 Update autogenerated code. Now generated with bison 2.5 instead of 2.4.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181231 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 20:44:40 +00:00
Stefan Fritsch
f64bd9fc9b Improve error message by removing 'unexpected T_ERROR' in one case.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181230 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 20:41:26 +00:00
William A. Rowe Jr
4d6a412856 Downgrade to DEBUG level several messages which were all redundant
to these NOTICE level messages;

Child: Starting %d worker threads
Child: All worker threads have exited


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181216 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 20:22:18 +00:00
William A. Rowe Jr
e1d2cbab65 Resolve server and remote IP's in the AcceptFilter 'none' path.
Lower the volume on a number of debug messages (and omit errno
  where we have no errno).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181140 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 19:02:09 +00:00
Stefan Fritsch
7d0348cd78 If a child is created just before graceful restart and then exits because
of a missing lock file, don't shutdown the whole server.

PR: 39311
Submitted by: Shawn Michael <smichael rightnow com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180742 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 23:10:12 +00:00
Stefan Fritsch
be61728fa5 Check the return value from ap_run_create_connection in mpm_event.
Add a todo in mpm_simple

PR: 41194
Submitted by: Davi Arnaut


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180737 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 22:41:54 +00:00
Stefan Fritsch
b5aafabf63 Consistently use base 10 for numbers when parsing config options. It may be
confusing to the user if some directives treat a number with leading zero as
octal while most don't.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180687 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 18:58:21 +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
caf0908cf5 Shut up gcc/glibc warning about ignoring write()'s return value.
This may actually fix a real bug in case the error log is directed to a FIFO.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180334 13f79535-47bb-0310-9956-ffa450edef68
2011-10-08 07:54:31 +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
a861cc3cfb Sort hooks twice, once before pre_config, once after ap_process_config_tree.
This fixes a regression with perl modules introduced by r1032002

PR: 45076
Submitted by: Torsten Foertsch <torsten foertsch gmx net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180325 13f79535-47bb-0310-9956-ffa450edef68
2011-10-08 07:15:58 +00:00
Stefan Fritsch
6327f51ed2 Export ap_max_mem_free, needed by r1178079, as pointed out by Gregg L. Smith
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1179448 13f79535-47bb-0310-9956-ffa450edef68
2011-10-05 21:25:58 +00:00
Joe Orton
3371c66263 SECURITY (CVE-2011-3368): Prevent unintended pattern expansion in some
reverse proxy configurations by strictly validating the request-URI:

* server/protocol.c (read_request_line): Send a 400 response if the
  request-URI does not match the grammar from RFC 2616.  This ensures
  the input string for RewriteRule et al really is an absolute path.

Reviewed by: rpluem, wrowe, covener, fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1179239 13f79535-47bb-0310-9956-ffa450edef68
2011-10-05 14:24:44 +00:00
Stefan Fritsch
a4092c7a7d Enforce LimitRequestFieldSize after multiple headers with the same
name have been merged.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1178566 13f79535-47bb-0310-9956-ffa450edef68
2011-10-03 20:37:49 +00:00
Stefan Fritsch
e1fc6f9d0c Some varbuf enhancements:
- Introduce new ap_varbuf_pdup() and ap_varbuf_regsub() functions.
- Fix some bugs in ap_varbuf_strmemcat().
- Make ap_varbuf.buf point to an empty string if no buffer has been allocated,
  yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1176018 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 20:05:09 +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
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Jim Jagielski
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
Stefan Fritsch
01ed21af9d Add wrappers for malloc, calloc, realloc that check for out of memory
situations.  Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.

PR 51568, PR 51569, PR 51571.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 16:25:42 +00:00
Eric Covener
f868cec39b Give a slightly more direct hint when no global ServerName is set. I still
think this buries the lead, but it's hard to rewrite to change the emphasis
yet maintain googleability.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172410 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 01:36:39 +00:00
Ruediger Pluem
cfe0a63cd5 * Correctly obey ServerName / ServerAlias if the Host header from the
request matches the VirtualHost address.

PR: 51709
Submitted by: Micha Lenk <micha lenk.info>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172002 13f79535-47bb-0310-9956-ffa450edef68
2011-09-17 15:08:14 +00:00
Guenter Knauf
026b641a70 Fix cut'n'paste errors: APR_DECLARE -> AP_DECLARE / part2.
Submitted by: NormW <normw gknw.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1171850 13f79535-47bb-0310-9956-ffa450edef68
2011-09-16 23:20:01 +00:00
Stefan Fritsch
2d4e23d88b Create wrapper API for apr_random;
use in mod_lbmethod_heartbeat and mod_serf to
- replace some needles use of apr_generate_random_bytes
- remove code duplication


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1171247 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15 19:53:59 +00:00
Jim Jagielski
625b89a7e2 Add in MaxRangeOverlaps and MaxRangeReversals to accomodate
more control over acceptable Range headers:

        See: http://trac.tools.ietf.org/wg/httpbis/trac/ticket/311

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1169756 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 14:15:53 +00:00
Eric Covener
c45e14b246 refactor to pull setting of Accept-Ranges header into http_protocol.c which
had been copied to other handlers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1166663 13f79535-47bb-0310-9956-ffa450edef68
2011-09-08 12:56:08 +00:00