1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

336 Commits

Author SHA1 Message Date
Nick Kew
b2aeb20201 Update r573831 to avoid duplicating URL-escaping code.
Ref. http://www.mail-archive.com/dev@httpd.apache.org/msg38532.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@589343 13f79535-47bb-0310-9956-ffa450edef68
2007-10-28 12:44:19 +00:00
André Malo
89d41bc442 don't fall through this case. Just break.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@575802 13f79535-47bb-0310-9956-ffa450edef68
2007-09-14 21:52:49 +00:00
Ruediger Pluem
ce9eaa96e8 * Add the novary flag to RewriteCond in order to prevent the appending
of HTTP headers used in a rewrite condition to the Vary header of
  the response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574684 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 20:15:54 +00:00
Ruediger Pluem
23c66c1ca1 * Also set the Vary header if a rewrite condition is true and uses a HTTP
header, but all remaining rewrite conditions are skipped due to the [OR]
  flag.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574201 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 10:42:23 +00:00
Nick Kew
c94d03e6c5 Add option to escape backreferences in RewriteRule.
PR 34602  and  PR 39746
Patch by Guenther Gsenger


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573831 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 12:46:10 +00:00
Nick Kew
e5061abc93 Multiple trivial fixes from Christophe JAILLET
PR 38699, 39518, 42005, 42006, 42007, 42008, 42009
The patches are all his, and are sufficiently trivial to review
at a glance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@557837 13f79535-47bb-0310-9956-ffa450edef68
2007-07-20 01:26:55 +00:00
Nick Kew
587fa063c4 Fix rewritemap/dbd bug pointed out by Davi Arnaut, and improve error reporting.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454732 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 13:15:07 +00:00
Nick Kew
c7fba09d23 Fix bugs pointed out by rpluem in rewritemap/dbd
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454723 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 12:47:50 +00:00
Nick Kew
719b8f18bc Retrieve optional functions in time!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454687 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 10:37:37 +00:00
Nick Kew
0e9e39732f Add SQL Query capability to RewriteMap
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454683 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 10:33:06 +00:00
Jeff Trawick
743a621e8d Replace ap_get_server_version with ap_get_server_banner() and
ap_get_server_description().

High-level summary:

The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive.

Third-party modules must now use ap_get_server_banner() or 
ap_get_server_description() in place of ap_get_server_version().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 13:08:15 +00:00
Mark J. Cox
862dd4e3e7 SECURITY: CVE-2006-3747 (cve.mitre.org)
mod_rewrite: Fix an off-by-one security problem in the ldap scheme
handling.  For some RewriteRules this could lead to a pointer being
written out of bounds.  Reported by Mark Dowd of McAfee.

Ack: trawick, lars, jorton, wrowe, benl



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@426138 13f79535-47bb-0310-9956-ffa450edef68
2006-07-27 17:03:34 +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
Garrett Rooney
1681b32d06 Add support for fcgi:// proxies to mod_rewrite.
Submitted by: Markus Schiegl <ms schiegl.com>

* modules/mappers/mod_rewrite.c
  (is_absolute_uri): Recognize fcgi:// urls.

* CHANGES: Note change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@405625 13f79535-47bb-0310-9956-ffa450edef68
2006-05-10 04:16:57 +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
Greg Ames
0aee87d2ee lookup_map_txtfile: used buffered i/o rather than reading RewriteMap txt: files
one byte at a time. 

I was horrified to see a dump of a server with hundreds of worker threads in 
read() syscalls,  all trying to read a 149k RewriteMap file simultaneously.  
each thread finds one key, inserts it into the cache, then the rest of the 
information is discarded.  there are further improvements which could be made but 
let's try the simplest first.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@161354 13f79535-47bb-0310-9956-ffa450edef68
2005-04-14 21:26:01 +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
Sander Striker
1bccfffd49 More hardcoded schemes in mod_rewrite... :/
Cooked up in a debugging session with Justin Erenkrantz.

* modules/mappers/mod_rewrite.c

  (splitout_queryargs): Don't mess with the query args when dealing
    with ajp or balancer.

  (hook_uri2file): Account for r->filename being NULL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@126171 13f79535-47bb-0310-9956-ffa450edef68
2005-01-23 00:58:30 +00:00
Sander Striker
47c6e884b2 Make the combination of mod_proxy_ajp and mod_rewrite work correctly.
* modules/proxy/proxy_ajp.c

  (ap_proxy_ajp_request): Update call to ajp_send_header().


* modules/proxy/ajp.h

  (ajp_send_header): Add a uri parameter.


* modules/proxy/ajp_header.c

  (ajp_marshal_into_msgb): Add a uri parameter and use the
   passed in uri instead of r->uri.

  (ajp_send_header): Add a uri parameter.  Update call to
   ajp_marshal_into_msgb().


* modules/mappers/mod_rewrite.c

  (is_absolute_uri): Add handling of 'ajp' and 'balancer' schemes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124584 13f79535-47bb-0310-9956-ffa450edef68
2005-01-07 22:17:48 +00:00
William A. Rowe Jr
38810d4197 Fix another signedness bug
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124278 13f79535-47bb-0310-9956-ffa450edef68
2005-01-05 21:23:29 +00:00
William A. Rowe Jr
d962fcfc8b FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME!
Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 05:33:44 +00:00
Joe Orton
3fae612ac1 * modules/mappers/mod_rewrite.c (hook_uri2file): Revert r1.259 to fix
regression in proxy and QUERY_STRING handling (though with proxy
issues on HEAD mod_rewrite [P] stuff is still completely broken).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105666 13f79535-47bb-0310-9956-ffa450edef68
2004-11-01 23:39:28 +00:00
Joe Orton
1b3a4c2013 * os/unix/os.h: Define AP_NEED_SET_MUTEX_PERMS.
* modules/mappers/mod_rewrite.c, modules/ssl/ssl_engine_mutex.c: Use
AP_NEED_SET_MUTEX_PERMS to determine whether unixd_set_*_mutex_perms
calls are necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105411 13f79535-47bb-0310-9956-ffa450edef68
2004-10-12 11:55:30 +00:00
André Malo
528f497f68 remove the RewriteOption MaxRedirects; LimitInternalRecursion is sufficient
for the administrator


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105399 13f79535-47bb-0310-9956-ffa450edef68
2004-10-10 15:40:33 +00:00
Jeff Trawick
0e88f02adb mod_rewrite: Handle per-location rules when r->filename is unset.
Previously this would segfault or simply not match as expected,
depending on the platform.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105198 13f79535-47bb-0310-9956-ffa450edef68
2004-09-18 16:18:26 +00:00
André Malo
ef13d0f1da Fix query string handling for proxied URLs.
PR: 14518
Submitted by: michael teitler <michael.teitler cetelem.fr>,
    Jan Kratochvil <rcpt-dev.AT.httpd.apache.org jankratochvil.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104884 13f79535-47bb-0310-9956-ffa450edef68
2004-08-28 16:08:21 +00:00
André Malo
230ea0b75a Fix darn typo.
Submitted by: Jan Kratochvil <rcpt-dev.AT.httpd.apache.org jankratochvil.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104878 13f79535-47bb-0310-9956-ffa450edef68
2004-08-28 10:36:19 +00:00
André Malo
7480ab8ebe external map responses were cut at 2048 bytes (and possibly got out of sync that
way). Now they are unlimited.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103691 13f79535-47bb-0310-9956-ffa450edef68
2004-05-17 23:36:15 +00:00
André Malo
cce91f3c79 fix cache confusion which happens if different virtualhosts define
rewritemaps with the same name.
This is done using name mangling. For the cache we prefix the map name
with the hex value of the current server struct pointer. This way
inherited maps still use the same cache.

PR: 26462


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103335 13f79535-47bb-0310-9956-ffa450edef68
2004-04-10 20:23:51 +00:00
André Malo
b1ffbe9cdb mod_rewrite no longer turns forward proxy requests into reverse proxy
requests.

PR: 28125


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103261 13f79535-47bb-0310-9956-ffa450edef68
2004-04-03 20:29:37 +00:00
André Malo
609678cf32 add support for rewrite rules in proxy containers
PR: 27985


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103199 13f79535-47bb-0310-9956-ffa450edef68
2004-03-29 21:34:19 +00:00
Madhusudan Mathihalli
bc33efe94a Enable mod_rewrite to recognize SSL variables (using ssl_var_lookup)
Submitted by: Joe Orton
Reviewed by: Madhusudan Mathihalli


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102904 13f79535-47bb-0310-9956-ffa450edef68
2004-03-09 17:33:15 +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
20e2e0190a issue a warning if an external rewrite map is used without RewriteLock.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102418 13f79535-47bb-0310-9956-ffa450edef68
2004-01-27 00:43:41 +00:00
André Malo
968929e2fa fix error handling during flag parsing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102417 13f79535-47bb-0310-9956-ffa450edef68
2004-01-27 00:22:10 +00:00
André Malo
f3e22caf1a EOLs sent by external rewritemaps are now consumed
as whole. That way, on systems with more than one EOL character
rewritemap programs no longer need to switch stdout to binary
mode.

PR: 25635


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102404 13f79535-47bb-0310-9956-ffa450edef68
2004-01-25 15:40:08 +00:00
André Malo
8a79938101 Introduce the ability to force a content handler via
the [handler=...] flag.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102401 13f79535-47bb-0310-9956-ffa450edef68
2004-01-24 21:21:49 +00:00
André Malo
b7e7f6c09e Introduce the RewriteCond -x check, which returns
true if the pattern is a file with execution permissions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102398 13f79535-47bb-0310-9956-ffa450edef68
2004-01-24 02:02:09 +00:00
André Malo
a68ada0ee9 allow proxying and rules in .htaccess in subrequests
PR: 14648, 15114


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102327 13f79535-47bb-0310-9956-ffa450edef68
2004-01-13 21:44:49 +00:00
André Malo
db86ab2f84 with the new general status stuff, F and G are just shortcuts
-> simplify.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102325 13f79535-47bb-0310-9956-ffa450edef68
2004-01-13 20:51:26 +00:00
André Malo
7a1acab8b5 allow setting of any valid HTTP response code via R flag.
except for redirects this implies [L] and match-only (no
substitution).

PR: 25917


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102321 13f79535-47bb-0310-9956-ffa450edef68
2004-01-13 18:17:55 +00:00
André Malo
7e0419850a no need to copy the string again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102316 13f79535-47bb-0310-9956-ffa450edef68
2004-01-13 02:31:15 +00:00
André Malo
16a624b1c2 weekday and monthnames are locale dependent...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102313 13f79535-47bb-0310-9956-ffa450edef68
2004-01-13 02:11:14 +00:00
André Malo
cf8a422ba6 make REMOTE_PORT available
PR: 25772


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102304 13f79535-47bb-0310-9956-ffa450edef68
2004-01-12 22:36:32 +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
André Malo
345df1e0fd style
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101744 13f79535-47bb-0310-9956-ffa450edef68
2003-11-10 21:27:45 +00:00