httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: [PATCH] apr_uri_unparse_components monthly reminder
Date Sat, 18 Aug 2001 20:37:34 GMT
On Fri, Aug 17, 2001 at 01:21:31PM -0500, William A. Rowe, Jr. wrote:
> Jon,
> 
>   can you take a look at the attached bug report, and assure that your patch
> handles this case correctly before we apply it today?  I'd like to lick all
> the bugs, and wanted to be sure that this report is dead as well (on 2.0.)

Okay, I don't think apr-util's version is affected by this (so 2.0 is
fine).

Apache 1.3 definitely is.  Consider the case where where uptr->path is
NULL.  This stops the string from expanding correctly.

The proposed patch looks correct.  Should I apply to apache-1.3?  I
think I need some +1s to commit it.  But, I'm not sure.  -- justin

Index: util_uri.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/util_uri.c,v
retrieving revision 1.35
diff -u -r1.35 util_uri.c
--- util_uri.c  2001/04/08 07:50:02     1.35
+++ util_uri.c  2001/08/18 20:31:14
@@ -246,8 +246,9 @@
         /* We must ensure we don't put out a hier_part and a rel_path
 * */
         if (j && uptr->path && *uptr->path != '/')
             parts[j++] = "/";
-        
-        parts[j++] = uptr->path;
+       
+        if (uptr->path) 
+            parts[j++] = uptr->path;
 
         if (!(flags & UNP_OMITQUERY)) {
             if (uptr->query) {


Mime
View raw message