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

883 Commits

Author SHA1 Message Date
Christophe Jaillet
94f37b1472 Save a few bytes in the request pool.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783056 13f79535-47bb-0310-9956-ffa450edef68
2017-02-15 03:48:30 +00:00
Jim Jagielski
0b1a529705 Adjust as needed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780328 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 03:52:34 +00:00
Eric Covener
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
Eric Covener
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
Rainer Jung
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
William A. Rowe Jr
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
Christophe Jaillet
93a3e87207 Constify and save a few bytes in the conf pool when parsing "UserDir" directive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1745835 13f79535-47bb-0310-9956-ffa450edef68
2016-05-28 05:54:19 +00:00
Stefan Eissing
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
Eric Covener
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
Eric Covener
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
Eric Covener
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
Eric Covener
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
Rainer Jung
3dc9649f31 mod_speling: make behavior of CheckCaseOnly and
the new CheckBasenameMatch orthogonal, so one
can combine them and they don't influence each
other.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1732273 13f79535-47bb-0310-9956-ffa450edef68
2016-02-25 10:09:09 +00:00
William A. Rowe Jr
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
William A. Rowe Jr
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
Rainer Jung
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
Eric Covener
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
Yann Ylavic
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
Christophe Jaillet
34253d88fb Use 'ap_array_str_contains' to simplify code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719252 13f79535-47bb-0310-9956-ffa450edef68
2015-12-11 04:17:42 +00:00
Yann Ylavic
6f8a850766 Follow up to r1715880: revert abusive ap_casecmpstr[n]() usages.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716151 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 14:38:54 +00:00
Yann Ylavic
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
Yann Ylavic
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
Yann Ylavic
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
Yann Ylavic
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
Christophe Jaillet
53b1fd652f Remove some useless 'return' statements.
Fix style.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715581 13f79535-47bb-0310-9956-ffa450edef68
2015-11-21 21:37:09 +00:00
Christophe Jaillet
68131d85a4 Fix some style issues on files that can easily be synch'ed with 2.4.x
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1705983 13f79535-47bb-0310-9956-ffa450edef68
2015-09-30 08:35:35 +00:00
Christophe Jaillet
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
Christophe Jaillet
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
Yann Ylavic
9f4af5d507 mod_negotiation: simplify type-map body tag lookup, and be safe
should it contain a NUL byte.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1700851 13f79535-47bb-0310-9956-ffa450edef68
2015-09-02 16:42:06 +00:00
Christophe Jaillet
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
Eric Covener
098a3d64cd + *) mod_dir: Prevent the internal identifier "httpd/unix-directory" from
+     appearing as a Content-Type response header when requests for a directory
+     are rewritten by mod_rewrite. [Eric Covener]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1695583 13f79535-47bb-0310-9956-ffa450edef68
2015-08-12 17:35:47 +00:00
Christophe Jaillet
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
Eric Covener
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
Yann Ylavic
d9a3b78926 s/\<\(\w\+\)\>\s\+\<\1\>/\1/g
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1690137 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 18:07:50 +00:00
Yann Ylavic
1291e3c8bd mod_alias: follow up to r1686853.
Factorize code (no functional change).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1686856 13f79535-47bb-0310-9956-ffa450edef68
2015-06-22 13:02:49 +00:00
Yann Ylavic
3c694b33e5 mod_alias: follow up to r1653941.
Limit Redirect expressions to directory (Location) context
and redirect statuses (implicit or explicit).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1686853 13f79535-47bb-0310-9956-ffa450edef68
2015-06-22 12:48:02 +00:00
Christophe Jaillet
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
Eric Covener
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
Yann Ylavic
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
Eric Covener
ca457364c8 revert r1675103 because it [at least] causes FallBackResource to kick
in before mod_autoindex might have kicked in.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1679620 13f79535-47bb-0310-9956-ffa450edef68
2015-05-15 18:44:49 +00:00
Yann Ylavic
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
Eric Covener
9c3517b507 If a directory exists but no indexes can be resolved, the fallback resource
should be attempted first before giving up.

Submitted By: Jack <tjerk.meesters gmail.com> , covener
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1675103 13f79535-47bb-0310-9956-ffa450edef68
2015-04-21 12:23:33 +00:00
Jan Kaluža
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
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
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
Eric Covener
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
Christophe Jaillet
a9c4c3a37d Concat string at compile time when possible.
Doing so, sometimes also give the opportunity to turn a 'ap_fputstrs' into a 'ap_fputs'.
PR 53741

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1626050 13f79535-47bb-0310-9956-ffa450edef68
2014-09-18 19:06:52 +00:00
Christophe Jaillet
2785b009e9 Silent some cppcheck warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621806 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 14:40:01 +00:00