apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r602477 - in /apr/apr-util/trunk: CHANGES uri/apr_uri.c
Date Sat, 08 Dec 2007 14:52:04 GMT
Author: rpluem
Date: Sat Dec  8 06:52:03 2007
New Revision: 602477

URL: http://svn.apache.org/viewvc?rev=602477&view=rev
Log:
* Ensure that apr_uri_unparse does not add scheme to URI if
  APR_URI_UNP_OMITSITEPART flag is set.

PR: 44044
Submitted by: Michael Clark <michael metaparadigm.com>
Reviewed by: rpluem

Modified:
    apr/apr-util/trunk/CHANGES
    apr/apr-util/trunk/uri/apr_uri.c

Modified: apr/apr-util/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/CHANGES?rev=602477&r1=602476&r2=602477&view=diff
==============================================================================
--- apr/apr-util/trunk/CHANGES [utf-8] (original)
+++ apr/apr-util/trunk/CHANGES [utf-8] Sat Dec  8 06:52:03 2007
@@ -1,6 +1,10 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.3.0
 
+  *) Ensure that apr_uri_unparse does not add scheme to URI if
+     APR_URI_UNP_OMITSITEPART flag is set. PR 44044
+     [Michael Clark <michael metaparadigm.com>]
+
   *) Add an LDAP rebind implementation so that authentication can be
      carried through referrals. [Paul J. Reder]
 

Modified: apr/apr-util/trunk/uri/apr_uri.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/uri/apr_uri.c?rev=602477&r1=602476&r2=602477&view=diff
==============================================================================
--- apr/apr-util/trunk/uri/apr_uri.c (original)
+++ apr/apr-util/trunk/uri/apr_uri.c Sat Dec  8 06:52:03 2007
@@ -92,12 +92,6 @@
                                     unsigned flags)
 {
     char *ret = "";
-    char *scheme = NULL;
-
-    if (uptr->scheme) {
-        scheme = apr_pstrcat(p, uptr->scheme, ":", NULL);
-    }
-
 
     /* If suppressing the site part, omit both user name & scheme://hostname */
     if (!(flags & APR_URI_UNP_OMITSITEPART)) {
@@ -140,9 +134,10 @@
                         is_default_port ? "" : uptr->port_str,
                         NULL);
         }
+	if (uptr->scheme) {
+	    ret = apr_pstrcat(p, uptr->scheme, ":", ret, NULL);
+	}
     }
-
-    ret = apr_pstrcat(p, scheme ? scheme : "", ret, NULL);
     
     /* Should we suppress all path info? */
     if (!(flags & APR_URI_UNP_OMITPATHINFO)) {



Mime
View raw message