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

773 Commits

Author SHA1 Message Date
Stefan Fritsch
75c8dfdfdb More error checking for ap_pregsub
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198988 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 22:58:52 +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
Jim Jagielski
2d56c9ab05 No longer do double duty...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1175979 13f79535-47bb-0310-9956-ffa450edef68
2011-09-26 18:12:38 +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
4ce184aeb0 replace non-threadsafe use of srand() and rand() with ap_random_pick()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1171251 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15 19:55:56 +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
Eric Covener
e74e7f6322 Prevent a crash if a non-existent internal RewriteMap is specified
in a server context with RewiteEngine off, then later referenced.

Submitted By: Ben Noordhuis
Reviewed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154808 13f79535-47bb-0310-9956-ffa450edef68
2011-08-08 02:29:39 +00:00
Stefan Fritsch
9bd21d2c8a Forbid some directives in .htaccess because of AllowOverrideList:
core:          AllowOverride, AllowOverrideList
mod_authn_dbd: AuthDBDUserPWQuery, AuthDBDUserRealmQuery
mod_authz_dbd: AuthzDBDQuery, AuthzDBDRedirectQuery
mod_proxy:     BalancerMember, ProxySet

Adjust for use in .htaccess:
mod_actions:   Script


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1153687 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 22:10:27 +00:00
Stefan Fritsch
481fac5ce2 Make the SERVER_NAME variable include [ ] for literal IPv6 addresses, as
mandated by RFC 3875

PR: 26005


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147614 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 13:56:28 +00:00
Stefan Fritsch
02e91f38f6 Fix parsing of Content-Length in type maps
PR: 42203
Submitted by: Nagae Hidetake <nagae eagan jp>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147557 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 08:52:35 +00:00
Eric Covener
b1b5e91608 improve (but preserve searchable parts of) the error message when Options
-Indexes is about to trigger a 403 in mod_autoindex, with a pointer
to mod_dir about how the DirectoryIndex might have been the real culprit.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147339 13f79535-47bb-0310-9956-ffa450edef68
2011-07-15 22:32:42 +00:00
Eric Covener
089fe8d519 Add a mod_dir option to allow the used DirectoryIndex to
be externally redirected.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147327 13f79535-47bb-0310-9956-ffa450edef68
2011-07-15 21:45:57 +00:00
Stefan Fritsch
32d9e326ef adjustments of build priorities of modules without special dependencies
all -> most:
- mod_sed

reallyall -> most:
- mod_log_debug

reallyall -> all:
- mod_dav_lock
- mod_echo
- mod_charset_lite
- mod_slotmem_plain
- mod_dialup

few -> all:
- mod_data
- mod_reflector
- mod_asis

most -> all:
- mod_heartbeat
- mod_heartmonitor
- mod_watchdog

most -> reallyall:
- mod_imagemap
- mod_cern_meta
- mod_ident

See thread at
http://mail-archives.apache.org/mod_mbox/httpd-dev/201107.mbox/%3C201107052321.56063.sf@sfritsch.de%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146227 13f79535-47bb-0310-9956-ffa450edef68
2011-07-13 18:59:28 +00:00
Stefan Fritsch
832670d8b2 Fix regexp RewriteCond with NoCase,
reported by Steffen <info apachelounge com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1143541 13f79535-47bb-0310-9956-ffa450edef68
2011-07-06 20:07:56 +00:00
Stefan Fritsch
46d4791a5d Add string valued expressions to ap_expr, do some API cleanup
- add possibility to have expressions that evaluate to a string and not to
  a boolean value
- modify ap_expr_parse_cmd() interface to support this and make it more
  convenient to use in general
- rename AP_EXPR_FLAGS_* to AP_EXPR_FLAG_* for consistency


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142164 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 07:45:00 +00:00
Stefan Fritsch
51692222f6 Various code cleanup
PR: 51398
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138627 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:45:34 +00:00
Stefan Fritsch
255f723fef We already have ap_str_tolower(), so also add ap_str_toupper() function and use
it where possible.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138617 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:24:27 +00:00
Jim Jagielski
2e655b0b63 revert this... sorry
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1136966 13f79535-47bb-0310-9956-ffa450edef68
2011-06-17 18:14:45 +00:00
Jim Jagielski
213dda7d09 Revert "fix unexpected enum operation"
This reverts commit d407a566ab24e576a3f143f5c27b2ccf90f5d8da.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1136946 13f79535-47bb-0310-9956-ffa450edef68
2011-06-17 17:15:54 +00:00
Jeff Trawick
554b49c5fe fix unexpected enum operation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1136096 13f79535-47bb-0310-9956-ffa450edef68
2011-06-15 15:51:57 +00:00
Stefan Fritsch
04d48349bb Code cleanup:
1) use apr_palloc instead of apr_pcalloc when all the fields of the allocated
structure are set afterwards.

2) avoid useless calls to 'strcasecmp' when we have already found what we are
looking for.

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51329


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135089 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 11:20:18 +00:00
Stefan Fritsch
48345b21d0 Avoid some memory allocations by using apr_table_setn where the string arguments
are allocated from the request pool and not modified later on.

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51358


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135084 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 11:04:29 +00:00
Stefan Fritsch
feca55db60 - Introduce concept of context prefix (which is an URL prefix)
and context document root (which is the file system directory that
  this URL prefix is mapped to). This generalization of the document
  root makes it easier for scripts to create self-referential URLs and
  to find their files.
- Expose CONTEXT_DOCUMENT_ROOT and CONTEXT_PREFIX as envvars, in mod_rewrite,
  and in ap_expr.
- Make mod_alias and mod_userdir set the context information.
- Allow to override the document root on a per-request basis. This allows
  mass vhosting modules to set DOCUMENT_ROOT correctly.
- Make mod_vhost_alias set the per-request document root

PR: 26052, 46198, 49705

Remaining tasks:
- Use the context document root & prefix in mod_rewrite to make RewriteBase
  unneccessary in many cases. Do this without breaking compatibility.
- Write docs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132494 13f79535-47bb-0310-9956-ffa450edef68
2011-06-05 21:33:12 +00:00
Stefan Fritsch
2014acf62f Improvements found by cppcheck:
remove some unused variables and dead assignments, reduce the scope of some
variables, add some parens to improve readability


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103459 13f79535-47bb-0310-9956-ffa450edef68
2011-05-15 16:58:45 +00:00
Jim Jagielski
2aef21903c Cleanup... most don't need apr_hooks.h at all...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101067 13f79535-47bb-0310-9956-ffa450edef68
2011-05-09 15:36:32 +00:00
Jeff Trawick
782c711893 fix some dead assignments found by the clang analyzer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1098162 13f79535-47bb-0310-9956-ffa450edef68
2011-04-30 21:18:58 +00:00
Stefan Fritsch
3508ccf5a5 Report filename and line number in config warning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096551 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 18:28:34 +00:00
Stefan Fritsch
23961debb8 avoid useless call to apr_pstrdup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1095972 13f79535-47bb-0310-9956-ffa450edef68
2011-04-22 18:02:34 +00:00
Jeff Trawick
562c645ad6 change signed single-bit fields to unsigned
some of these were exposed to mods so the mmn is bumped, without
regard to whether any compiler will have to generate different
code


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086662 13f79535-47bb-0310-9956-ffa450edef68
2011-03-29 18:20:52 +00:00
Rich Bowen
30fa792204 Or, perhaps that's even clearer, without getting too verbose.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1084714 13f79535-47bb-0310-9956-ffa450edef68
2011-03-23 20:11:43 +00:00
Rich Bowen
7e9a6ee3c2 Attemps to clarify a rather cryptic error message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1084698 13f79535-47bb-0310-9956-ffa450edef68
2011-03-23 19:49:02 +00:00
Guenter Knauf
888ec80125 Use a var INSTALLBASE to simplify NetWare installation rules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 04:56:06 +00:00
Guenter Knauf
bab978c56e Use var for prelude so its possible to change it at one place.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082811 13f79535-47bb-0310-9956-ffa450edef68
2011-03-18 03:09:27 +00:00
Graham Leggett
4be5710bbe mod_rewrite: Decline immediately if the rewrite engine is disabled, instead
of making various comparatively expensive proxy checks first.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081197 13f79535-47bb-0310-9956-ffa450edef68
2011-03-13 19:05:39 +00:00
Guenter Knauf
e8a8becc0f NetWare build overhaul in order to compile on Linux.
Removed absolute paths to imp files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079487 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 18:59:02 +00:00
Guenter Knauf
46b7e1d210 NetWare build overhaul in order to compile on Linux.
Take 1.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079407 13f79535-47bb-0310-9956-ffa450edef68
2011-03-08 16:04:40 +00:00
Stefan Fritsch
385da96d50 Use ap_state_query() to fix many modules that were not correctly initializing
if they were not active during server startup but got enabled later during a
graceful restart (in which case they need to do all work during a single
config run).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1070153 13f79535-47bb-0310-9956-ffa450edef68
2011-02-12 21:23:56 +00:00
Stefan Fritsch
6c6979ede6 Make the REQUEST_SCHEME variable available to scripts and mod_rewrite
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053872 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 12:34:19 +00:00
Ruediger Pluem
abcc9f0497 * Silence compiler warning about possibly uninitialized use
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053814 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 07:41:18 +00:00
Stefan Fritsch
95216d3918 Allow to use arbitrary boolean expressions (ap_expr) in RewriteCond.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053750 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 21:48:35 +00:00
Stefan Fritsch
6c6d387525 in struct backrefinfo: remove nsub member which is never read,
make source member const


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053742 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 21:22:33 +00:00
Stefan Fritsch
7f6106542e Allow to unset environment variables using E=!VAR.
PR: 49512
Submitted by: Mark Drayton <mark markdrayton info>, Stefan Fritsch


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053726 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 20:41:55 +00:00
Igor Galić
d5024cd27c In comments: s@ XX @ XXX: @ so they can actually be found seen.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053668 13f79535-47bb-0310-9956-ffa450edef68
2010-12-29 16:25:12 +00:00
Stefan Fritsch
1c07bd20b7 readability improvements:
rename w -> user, x -> prefix
break some very long lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053349 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 13:39:04 +00:00
Stefan Fritsch
2e0a2e3029 Rename some variables for better readability:
p -> alias (not a pool)
r -> real  (not a request_rec)
f -> fake


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053345 13f79535-47bb-0310-9956-ffa450edef68
2010-12-28 13:35:15 +00:00
Eric Covener
fce013d234 PR 50447: mod_rewrite escapes the original [escaped] query string even when
you haven't modified it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1044673 13f79535-47bb-0310-9956-ffa450edef68
2010-12-11 16:14:06 +00:00
Eric Covener
47280b5452 PR 39313: allow the user to configure which rules come first when RewriteRules
are merged with RewriteOptions Inherit.

Submitted By: Jérôme Grandjanny <jerome.grandjanny cea.fr> 
Reviewed By: covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042255 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 22:33:46 +00:00
Eric Covener
8270929a33 PR44076: allow "userdir disabled" or "userdir public_html" in global scope to
be merged with lists of enabled users in virtual host context as one would 
expect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1042090 13f79535-47bb-0310-9956-ffa450edef68
2010-12-04 03:30:40 +00:00