From 1bccfffd4948fde7c97bace03acd4d0c1f82044f Mon Sep 17 00:00:00 2001 From: Sander Striker Date: Sun, 23 Jan 2005 00:58:30 +0000 Subject: [PATCH] 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 --- modules/mappers/mod_rewrite.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 0195b1fff6..4c949f6fec 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -704,7 +704,9 @@ static void splitout_queryargs(request_rec *r, int qsappend) /* don't touch, unless it's an http or mailto URL. * See RFC 1738 and RFC 2368. */ - if ( is_absolute_uri(r->filename) + if (is_absolute_uri(r->filename) + && strncasecmp(r->filename, "ajp", 3) + && strncasecmp(r->filename, "balancer", 8) && strncasecmp(r->filename, "http", 4) && strncasecmp(r->filename, "mailto", 6)) { r->args = NULL; /* forget the query that's still flying around */ @@ -4241,7 +4243,7 @@ static int hook_uri2file(request_rec *r) return n; } - flen = strlen(r->filename); + flen = r->filename ? strlen(r->filename) : 0; if (flen > 6 && strncmp(r->filename, "proxy:", 6) == 0) { /* it should be go on as an internal proxy request */ -- 2.40.0