httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r565671 - in /httpd/httpd/trunk: CHANGES modules/mappers/mod_negotiation.c
Date Tue, 14 Aug 2007 09:22:16 GMT
Author: niq
Date: Tue Aug 14 02:22:15 2007
New Revision: 565671

URL: http://svn.apache.org/viewvc?view=rev&rev=565671
Log:
mod_negotiation: preserve Query String in resolving a type map
PR 33112.  Report with patch by Jørgen Thomsen.
Attention called to it by Per Jessen.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/mappers/mod_negotiation.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=565671&r1=565670&r2=565671
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Aug 14 02:22:15 2007
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.3.0
 
+  *) mod_negotiation: preserve Query String in resolving a type map
+     PR 33112 [Jørgen Thomsen <apache jth.net>, Nick Kew]
+
   *) mod_deflate: fix content_encoding detection in inflate_out filter
      when it's not in response headers table.
      PR 42993 [Nick Kew]

Modified: httpd/httpd/trunk/modules/mappers/mod_negotiation.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_negotiation.c?view=diff&rev=565671&r1=565670&r2=565671
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_negotiation.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_negotiation.c Tue Aug 14 02:22:15 2007
@@ -2971,6 +2971,7 @@
     var_rec *best;
     int res;
     char *udir;
+    const char *new_req;
 
     if(strcmp(r->handler,MAP_FILE_MAGIC_TYPE) && strcmp(r->handler,"type-map"))
         return DECLINED;
@@ -3061,8 +3062,21 @@
     }
     udir = ap_make_dirstr_parent(r->pool, r->uri);
     udir = ap_escape_uri(r->pool, udir);
-    ap_internal_redirect(apr_pstrcat(r->pool, udir, best->file_name,
-                                     r->path_info, NULL), r);
+    if (r->args) {
+        if (r->path_info) {
+            new_req = apr_pstrcat(r->pool, udir, best->file_name,
+                                  r->path_info, "?", r->args, NULL);
+        }
+        else {
+            new_req = apr_pstrcat(r->pool, udir, best->file_name,
+                                  "?", r->args, NULL);
+        }
+    }
+    else {
+        new_req = apr_pstrcat(r->pool, udir, best->file_name,
+                              r->path_info, NULL);
+    }
+    ap_internal_redirect(new_req, r);
     return OK;
 }
 



Mime
View raw message