1b461200cc
PR60009: RewriteRule local prefix checking update
...
*) mod_rewrite: When a substitution is a fully qualified URL, and the
scheme/host/port matches the current virtual host, stop interpreting the
path component as a local path just because the first component of the
path exists in the filesystem. Adds RewriteOption "LegacyPrefixDocRoot"
to revert to previous behavior. PR60009.
Submitted By: Hank Ibell <hwibell gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1776463 13f79535-47bb-0310-9956-ffa450edef68
2016-12-29 18:39:24 +00:00
091c89150a
short-circuit some kinds of looping in RewriteRule.
...
PR60478
Submitted By: Jeff Wheelouse <apache wheelhouse.org>
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1774288 13f79535-47bb-0310-9956-ffa450edef68
2016-12-14 16:27:15 +00:00
d79b514c4b
Fix spelling in comments and text files.
...
No functional change.
PR 59990
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
f4cc76ee71
Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 00:06:42 +00:00
3f6348b4f3
mod_rewrite: adding h2:// and h2c:// proxy schemes to absolute uri detection, patch by Evgeny Kotkov
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744206 13f79535-47bb-0310-9956-ffa450edef68
2016-05-17 08:24:10 +00:00
c1922e4d0c
[PATCH] mod_rewrite: double escaping of query strings in server context
...
(like PR50447, for server context)
Submitted By: Evgeny Kotkov <evgeny.kotkov visualsvn.com>
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735088 13f79535-47bb-0310-9956-ffa450edef68
2016-03-15 14:57:46 +00:00
3de1240063
followup to r1734125: null check for r->args
...
before cleaning up some QSA cases.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734294 13f79535-47bb-0310-9956-ffa450edef68
2016-03-09 18:23:23 +00:00
9abfad5705
mod_rewrite: Add QSL|qslast flag to allow rewrites to files with
...
literal question marks in their names.
PR 58777.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1734125 13f79535-47bb-0310-9956-ffa450edef68
2016-03-08 19:18:15 +00:00
dd88a30642
revert broken r1724656 which moved the rewrite loop checks
...
until after bases had been stripped and added in prep
for internal redirect.
original issue & regression disussed in PR58854
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732896 13f79535-47bb-0310-9956-ffa450edef68
2016-02-29 13:48:50 +00:00
87eed91ad1
Sync mod_rewrite REMOTE_HOST to newbehavior (REMOTE_ADDR is useragent_ip)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730127 13f79535-47bb-0310-9956-ffa450edef68
2016-02-12 22:05:24 +00:00
690c6105f9
hostname: Test and log useragent_host per-request across various modules,
...
including the scoreboard, expression and rewrite engines, setenvif,
authz_host, access_compat, custom logging, ssl and REMOTE_HOST variables.
PR55348 [William Rowe]
This is the complete change set which applies cleanly to 2.4.x as well,
the server/scoreboard.c will follow, which does not apply due to drift.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729930 13f79535-47bb-0310-9956-ffa450edef68
2016-02-12 01:17:03 +00:00
af14d158a3
Added many log numbers to log statements that
...
had none.
Those were not detected by the coccinelle script.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725485 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 12:02:41 +00:00
5327f57248
*) mod_rewrite: Avoid looping on relative substitutions that
...
result in the same filename we started with. PR 58854.
[Eric Covener]
Previously, the comparison of old and new filename happened before
some prefixes might be added.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724656 13f79535-47bb-0310-9956-ffa450edef68
2016-01-14 17:08:17 +00:00
4bfe0a6bba
Follow up to r1715880: revert more abusive ap_casecmpstr[n]() usages.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722150 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 15:32:27 +00:00
e30575b0b0
More ap_casecmpstr[n]() usages (follow up to r1715876).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715880 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:48:35 +00:00
c80e6b2a34
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715876 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:46:01 +00:00
3c9ddf44bf
Revert r1715789: will re-commit without spurious functional changes.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715869 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:28:36 +00:00
29843dc73f
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
...
[Reverted by r1715869]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715789 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 12:33:09 +00:00
dcad11179f
Improve macro definition in order to avoid potential precedence issues.
...
For example, sparse spotted that the following line was spurious:
newcond->flags &= ~CONDFLAG_NOCASE;
It this particular case, 2 bits were resetted (instead of only 1). This was harmless because the first bit (i.e. CONDFLAG_NONE) is never tested as-is.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701545 13f79535-47bb-0310-9956-ffa450edef68
2015-09-07 05:24:43 +00:00
c888b52309
Revert r1697735.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1701543 13f79535-47bb-0310-9956-ffa450edef68
2015-09-07 05:15:48 +00:00
08a3141d12
Fix an error spotted by sparse.
...
Without the parens, the 2 first bits are reseted, instead of just the one for CONDFLAG_NOCASE.
This "bug" looks harmless as the first bit (CONDFLAG_NONE) is never tested.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1697735 13f79535-47bb-0310-9956-ffa450edef68
2015-08-25 16:57:13 +00:00
1bce6978fb
Avoid a crash when lacking correct DB access permissions. PR 57868.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1695170 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 21:31:05 +00:00
069322678e
Allow cookies set by mod_rewrite to contain ':' by accepting
...
';' as an alternate separator. PR47241.
Submitted By: <bugzilla schermesser com>, covener
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1693963 13f79535-47bb-0310-9956-ffa450edef68
2015-08-03 20:09:34 +00:00
dc2bb62c4b
Initialize args to not print garbage mem during a RewriteCond parse error (same as r1681795 for RewriteRule)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1682988 13f79535-47bb-0310-9956-ffa450edef68
2015-06-01 20:10:01 +00:00
2e4745c7a6
initialize args to not print garbage mem during a RewriteRule parse error
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1681795 13f79535-47bb-0310-9956-ffa450edef68
2015-05-26 17:24:13 +00:00
d370b92fe8
Follow up to r1679181: fix warning (return discards qualifiers from pointer target type).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679712 13f79535-47bb-0310-9956-ffa450edef68
2015-05-16 09:06:25 +00:00
c1d21475a6
mod_authn_dbd, mod_authz_dbd, mod_session_dbd, mod_rewrite: Fix lifetime
...
of DB lookup entries independently of the selected DB engine. PR 46421.
Suggested by: Michel Stam <michel reverze net>
Proposed by: Steven whitson <steven.whitson gmail com>
Reviewed/Extended/Committed by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679181 13f79535-47bb-0310-9956-ffa450edef68
2015-05-13 11:34:30 +00:00
c31475601a
*) mod_rewrite: Add support for starting External Rewriting Programs
...
as non-root user on UNIX systems by specifying username and group name
as third argument of RewriteMap directive.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664565 13f79535-47bb-0310-9956-ffa450edef68
2015-03-06 09:14:07 +00:00
e6250a9198
mod_rewrite: Improve 'bad flag delimeters' startup error by showing
...
how the input was tokenized. PR 56528.
Submitted By: Edward Lu <Chaosed0 gmail.com>
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1652507 13f79535-47bb-0310-9956-ffa450edef68
2015-01-16 19:43:30 +00:00
838b88e3d0
Remove some instances where a RewriteBase must be specified
...
Previously, any time you used a relative substitution in
per-directory/htaccess context, you needed to specify
a RewriteBase. But in case where the context document root
and context prefix are known via e.g. mod_userdir
or mod_alias, and the substitution is under the context
document root, we can determine the replacement automatically.
This makes htaccess files or config snippets a bit more
portable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1642484 13f79535-47bb-0310-9956-ffa450edef68
2014-11-29 23:16:56 +00:00
d0edc26214
the fixup hook should log (what is expected to be) local
...
path just like the translate name hook, for a small hint
when debugging 400 errors set just below
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1596963 13f79535-47bb-0310-9956-ffa450edef68
2014-05-22 20:29:29 +00:00
2aa898bb2f
strncmp(r->filename, "proxy:", 6) is faster than a
...
note. Plus, allows for checking even if not due to
rewrite.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588544 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 19:21:35 +00:00
911f522c2a
add BNP flag to give control to the user on whether a space ' ' in
...
an escaped backrefernece is decoded to a + (default) or %20. Useful
if your backreference isn't going into the query string.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585157 13f79535-47bb-0310-9956-ffa450edef68
2014-04-05 18:40:36 +00:00
0bfd7243b3
allow users to workaround the over-agressive backreference
...
escaping by selecting the characters to escape.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1584417 13f79535-47bb-0310-9956-ffa450edef68
2014-04-03 21:53:14 +00:00
e280cf4ff7
normalize an ugly construct which somehow manages to return the correct value
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1571369 13f79535-47bb-0310-9956-ffa450edef68
2014-02-24 17:52:08 +00:00
4ef49e127a
*) mod_rewrite: Add RewriteOptions InheritDown, InheritDownBefore,
...
and IgnoreInherit to allow RewriteRules to be pushed from parent scopes
to child scopes without explicitly configuring each child scope.
PR56153.
Submitted By: Edward Lu
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570288 13f79535-47bb-0310-9956-ffa450edef68
2014-02-20 18:08:31 +00:00
c1ae372322
Add %{CONN_REMOTE_ADDR} to mod_rewrite. PR56094
...
Submitted By: Edward Lu <Chaosed0 gmail com>
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1563418 13f79535-47bb-0310-9956-ffa450edef68
2014-02-01 14:02:29 +00:00
72df6b36bf
make mod_rewrite and mod_proxy UDS work together...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1560367 13f79535-47bb-0310-9956-ffa450edef68
2014-01-22 14:54:21 +00:00
3c8e6bbaf8
no make depend in sandbox, fix bld break from r1559394
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1559398 13f79535-47bb-0310-9956-ffa450edef68
2014-01-18 19:36:17 +00:00
6d582e83aa
don't search for directory indexes/directoryslashes if a URL is in the
...
middle of being rewritten [in per-dir context]. PR53929
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1557641 13f79535-47bb-0310-9956-ffa450edef68
2014-01-13 01:51:58 +00:00
be6ef336b2
avoid a tight busy loop with memory allocations when the [N] flag
...
isn't making progress.
If backported, probably increase the hard-coded limit to 32k from 10k.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1556206 13f79535-47bb-0310-9956-ffa450edef68
2014-01-07 13:07:51 +00:00
ef357793f4
*) mod_rewrite: Make rewrite websocket aware to allow proxying.
...
PR 55598. [Chris Harris <chris.harris kitware com>]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528556 13f79535-47bb-0310-9956-ffa450edef68
2013-10-02 16:38:39 +00:00
e4e1533f6a
include util_charset.h in ebcdic builds
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1499025 13f79535-47bb-0310-9956-ffa450edef68
2013-07-02 17:16:47 +00:00
bb69ec6cfe
Remove useless tests.
...
Turn
if (*x && apr_isspace(*x))
into
if (apr_isspace(*x))
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452128 13f79535-47bb-0310-9956-ffa450edef68
2013-03-03 21:25:46 +00:00
08b292cec6
Unbreak default case of RewriteBase not being set after r1410681
...
Contributed By: Evgeny Barsukov
Reviewed By: covener
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1447426 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 18:46:23 +00:00
5d16310f14
PR53963: don't merge the rewritebase down w/o an opt-in
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410681 13f79535-47bb-0310-9956-ffa450edef68
2012-11-17 02:59:31 +00:00
76949b5e25
remove now unecessary assignment
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369999 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 20:42:51 +00:00
ce4178c36f
Use apr_pcalloc for rewritemap_entry struct, to avoid uninitialized entries.
...
PR: 53663
Submitted by: Mikhail T. <mi apache aldan algebra com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1369995 13f79535-47bb-0310-9956-ffa450edef68
2012-08-06 20:40:37 +00:00
1eea823bf2
style fix
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1359857 13f79535-47bb-0310-9956-ffa450edef68
2012-07-10 19:45:27 +00:00
e10a9c65a2
add a pointer to 'rewriteoptions', without giving away the option name, if someone
...
happens to have rewrite trace on when mod_rewrite declines a non URL-path.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1356813 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 16:19:29 +00:00