Yann Ylavic
89a027a48a
mod_alias: follow up to r1653941.
...
Fill empty APLOGNO().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656225 13f79535-47bb-0310-9956-ffa450edef68
2015-01-31 17:53:42 +00:00
Graham Leggett
7e120c114b
Use unsigned bit fields.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653978 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 18:06:57 +00:00
Graham Leggett
5488d21243
mod_alias: Introduce expression parser support for Alias, ScriptAlias
...
and Redirect.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1653941 13f79535-47bb-0310-9956-ffa450edef68
2015-01-22 17:02:22 +00:00
Eric Covener
8b7d9aa142
stop setting context info for AliasMatch. These concepts do not really map
...
well/reliably to AliasMatch.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593745 13f79535-47bb-0310-9956-ffa450edef68
2014-05-10 23:43:48 +00:00
Rainer Jung
8ac4515e60
Fix segfault in mod_alias introduced in r1132494.
...
AliasMatch does not append unmatched parts of the
original URI to the new URI. So no need to subtract
anything from the new URI length.
The existing code crashed when using
"AliasMatch / /some/thing" and sending a request
with a long URI.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1583175 13f79535-47bb-0310-9956-ffa450edef68
2014-03-30 18:20:09 +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
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
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
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
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
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
Stefan Fritsch
ebb62867fb
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
...
advantage of per-module loglevels
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Nick Kew
56195d4ec5
mod_alias: Ensure Redirect issues a valid URL
...
PR 44020
Patch by Håkon Stordahl
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@785575 13f79535-47bb-0310-9956-ffa450edef68
2009-06-17 12:45:21 +00:00
Jim Jagielski
3e28922876
Simplify... handle this below, even though it's
...
after some possible expensive regex
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780699 13f79535-47bb-0310-9956-ffa450edef68
2009-06-01 15:57:48 +00:00
Jim Jagielski
4f39a8423f
typo
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780697 13f79535-47bb-0310-9956-ffa450edef68
2009-06-01 15:50:16 +00:00
Jim Jagielski
7eea300512
More adjustment for Redirect argument checking...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780692 13f79535-47bb-0310-9956-ffa450edef68
2009-06-01 15:39:33 +00:00
Ruediger Pluem
3ae933ccf1
* Some custom defined response codes also do not require 3 arguments (all that
...
are not redirects).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780655 13f79535-47bb-0310-9956-ffa450edef68
2009-06-01 14:08:19 +00:00
Jim Jagielski
a110cfaaf9
Fix error with arg counting
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780648 13f79535-47bb-0310-9956-ffa450edef68
2009-06-01 13:37:59 +00:00
Nick Kew
563e30e937
mod_alias: Enforce sanity in args to Redirect
...
PR 44729
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@778942 13f79535-47bb-0310-9956-ffa450edef68
2009-05-27 00:58:41 +00:00
Nick Kew
919bee3f1a
PR#35314: Enable path components in Redirect
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@490142 13f79535-47bb-0310-9956-ffa450edef68
2006-12-25 12:06:33 +00:00
Roy T. Fielding
de659cbed0
update license header text
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c
Update the copyright year in all .c, .h and .xml files
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Jim Jagielski
5061d9fa92
No functional Change: Removing trailing whitespace. This also
...
means that "blank" lines consisting of just spaces or
tabs are now really blank lines
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Joe Orton
a0570c8746
Move the POSIX reg* implementations into the ap_* namespace;
...
internalise the ap_reg*<->PCRE wrapper:
* configure.in: Add srclib/pcre to the include path.
* include/ap_regex.h: Renamed from include/pcreposix.h. Prefix all
constants with AP_; prefix all functions and types with ap_. Define
AP_DECLARE to nothing if necessary. Remove regcomp error codes.
* include/httpd.h: Include ap_regex.h not pcreposix.h.
(ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/.
(ap_regexec, ap_regerror): Prototypes moved to ap_regex.h.
* server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree):
Adjust for ap_ prefixed types. (ap_regexec, ap_regerror): Removed.
* server/Makefile.in: Build util_pcre.c.
* server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use
of PCRE-internals to do error mapping; rename types to add AP_/ap_
prefixes as above. Use APR includes. (ap_regerror): Use apr_snprintf.
* srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la.
* modules/*: Update to use new type and constant names.
PR: 27750 (part one)
Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153384 13f79535-47bb-0310-9956-ffa450edef68
2005-02-11 12:00:41 +00:00
Justin Erenkrantz
905cdf9f0b
Update copyright year to 2005 and standardize on current copyright owner line.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
André Malo
28b9a34268
emit the config filename when warning about overlapping aliases
...
Submitted by: Guenter Knauf <eflash gmx.net>
Reviewed by: Dirk-Willem van Gulik
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102949 13f79535-47bb-0310-9956-ffa450edef68
2004-03-13 21:19:56 +00:00
André Malo
a688f06b19
fix name of The Apache Software Foundation
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102618 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:31:03 +00:00
André Malo
3d75c8c079
fix copyright dates according to the first check in
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102572 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 12:27:14 +00:00
André Malo
4f02cb1e18
apply Apache License, Version 2.0
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
fb07607180
update license to 2004.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Sander Striker
67a3a71877
Fold in the CAN-2003-0542 regex patch.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101556 13f79535-47bb-0310-9956-ffa450edef68
2003-10-24 16:20:28 +00:00
André Malo
ebd1a5a939
When using Redirect in directory context, append requested query
...
string if there's no one supplied by configuration.
PR: 10961
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98796 13f79535-47bb-0310-9956-ffa450edef68
2003-02-25 22:59:58 +00:00
Jeff Trawick
dbc226f30a
quiet a gcc warning by adding () around && within ||
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98741 13f79535-47bb-0310-9956-ffa450edef68
2003-02-20 14:12:07 +00:00
André Malo
f983c2a36c
use a better text for the overlap warning.
...
Submitted by: Joshua Slive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98658 13f79535-47bb-0310-9956-ffa450edef68
2003-02-14 18:57:10 +00:00
André Malo
989285ce7d
extend the check for Alias overlappings. Now test also previous
...
(Script)AliasMatch commands.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98657 13f79535-47bb-0310-9956-ffa450edef68
2003-02-14 18:14:24 +00:00
André Malo
34850f47e5
people often assume that their Aliases will be found by "best match" rather
...
than "first match". Throw out warnings, if there are obvious overlappings, e.g.:
Alias /foo /somewhere
Alias /foo/bar /elsewhere
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98647 13f79535-47bb-0310-9956-ffa450edef68
2003-02-14 03:51:01 +00:00
André Malo
742af25096
finished that boring job:
...
update license to 2003.
Happy New Year! ;-))
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Joshua Slive
963d47482b
Fix some hook ordering problems. mod_vhost_alias should, perhaps, be HOOK_LAST.
...
It redefines the document root, so it should only be used if no other mapper wants
the request. I haven't made that change here; I've simply put explict ordering
to make sure we get
mod_alias -> mod_userdir -> mod_vhost_alias
I can't compile apache at the moment for other reasons, so this is untested,
but it looks right to me.
PR: 8853
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96137 13f79535-47bb-0310-9956-ffa450edef68
2002-07-21 18:06:51 +00:00
Brian Pane
d90bcd9aa1
Remove some extraneous comparison operations
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95584 13f79535-47bb-0310-9956-ffa450edef68
2002-06-08 06:28:16 +00:00
Justin Erenkrantz
5684be1b7e
The style police have arrested mod_alias on charges of violating law and
...
order. It has been released after submitting to rehabilitation.
(No functional changes.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95503 13f79535-47bb-0310-9956-ffa450edef68
2002-06-04 16:47:10 +00:00
Jeff Trawick
50bac91072
stop using APLOG_NOERRNO in calls to ap_log_[pr]error()
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95150 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:24:17 +00:00
Joshua Slive
0cf8e3be48
Reverse the hook ordering for mod_userdir and mod_alias so
...
that Alias/ScriptAlias will override Userdir.
PR: 8841
Reviewed by: Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94985 13f79535-47bb-0310-9956-ffa450edef68
2002-05-07 00:17:11 +00:00
William A. Rowe Jr
65a37752ec
Eliminate potential ap_server_root_relative segfaults, with the input
...
of Jeff Trawick's style changes to the first patches. Doesn't include
the fixes to ssl [more complex], and we won't trap errors that involve
ap_serverroot, since we presume that was normalized on the way in.
Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
should never become necessary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Roy T. Fielding
845cbfd508
Update our copyright for this year.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Ken Coar
d19986c33b
Change the 'we turned /foo into http://host/foo ' log message
...
to DEBUG; no reason to clutter people's log files with this
when it's supported behaviour. Of course, they can find out
about the performance impact by LogLeveling Debug. :-)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93251 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 11:35:57 +00:00
Ken Coar
dc161e96cc
If the RedirectMatch target is an abs_path, make it an absoluteURI
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93143 13f79535-47bb-0310-9956-ffa450edef68
2002-01-31 20:38:08 +00:00
Ken Coar
f06c74cd5a
Fix RedirectMatch so it won't emit invalid Location fields.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93137 13f79535-47bb-0310-9956-ffa450edef68
2002-01-31 18:44:48 +00:00
Brian Pane
077ac3eb39
optimized away a strlen call in alias_matches()
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92138 13f79535-47bb-0310-9956-ffa450edef68
2001-11-22 21:19:02 +00:00
Justin Erenkrantz
7f2eeda9d0
Fix RedirectMatch handling to properly handle URLs with host portions.
...
Previously, we would segfault if no path is specified (case 1 below).
We would also ignore any host and scheme portion of the URL (which is
how we specify it on daedalus), so restore that capability.
The query strings will still not be escaped (standards cops can
determine if this is correct behavior).
The following directives now work as expected:
RedirectMatch /jakarta1(.*) http://jakarta.apache.org$1
RedirectMatch /jakarta2(.*) http://jakarta.apache.org/dist$1
RedirectMatch /jakarta3(.*) http://jakarta.apache.org/dist$1?bar=foo
RedirectMatch /jakarta4(.*) http://jakarta.apache.org/dist$1?bar=foo#spaz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91672 13f79535-47bb-0310-9956-ffa450edef68
2001-10-26 19:39:51 +00:00
William A. Rowe Jr
690def4de4
Clear out this optimization till we are prepared for it (not now.)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90562 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 18:49:55 +00:00