httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1734294 - /httpd/httpd/trunk/modules/mappers/mod_rewrite.c
Date Wed, 09 Mar 2016 18:23:23 GMT
Author: covener
Date: Wed Mar  9 18:23:23 2016
New Revision: 1734294

URL: http://svn.apache.org/viewvc?rev=1734294&view=rev
Log:
followup to r1734125: null check for r->args
before cleaning up some QSA cases.


Modified:
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1734294&r1=1734293&r2=1734294&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Wed Mar  9 18:23:23 2016
@@ -790,12 +790,15 @@ static void splitout_queryargs(request_r
             r->args = apr_pstrdup(r->pool, q);
         }
 
-        len = strlen(r->args);
-        if (!len) {
-            r->args = NULL;
-        }
-        else if (r->args[len-1] == '&') {
-            r->args[len-1] = '\0';
+        if (r->args) { 
+           len = strlen(r->args);
+      
+           if (!len) {
+               r->args = NULL;
+           }
+           else if (r->args[len-1] == '&') {
+               r->args[len-1] = '\0';
+           }
         }
 
         rewritelog((r, 3, NULL, "split uri=%s -> uri=%s, args=%s", olduri,



Mime
View raw message