You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by se...@apache.org on 2008/03/06 17:13:47 UTC

svn commit: r634331 - /webservices/axis2/trunk/c/util/src/url.c

Author: senaka
Date: Thu Mar  6 08:13:46 2008
New Revision: 634331

URL: http://svn.apache.org/viewvc?rev=634331&view=rev
Log:
Fixing bug in interpreting url's having query component, but no port

Modified:
    webservices/axis2/trunk/c/util/src/url.c

Modified: webservices/axis2/trunk/c/util/src/url.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/url.c?rev=634331&r1=634330&r2=634331&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/url.c (original)
+++ webservices/axis2/trunk/c/util/src/url.c Thu Mar  6 08:13:46 2008
@@ -174,6 +174,10 @@
         {
             path = strchr(host, '?');
         }
+        else
+        {
+            *path++ = '\0';
+        }
         if (!path)
         {
             path = strchr(host, '#');
@@ -188,9 +192,14 @@
         }
         else
         {
+            axis2_char_t *path_temp = NULL;
+
+            path_temp = axutil_strdup(env, path);
+            *path = '\0';
             /* here we have protocol + host + def port + path */
-            ret = axutil_url_create(env, protocol, host, port, path);
+            ret = axutil_url_create(env, protocol, host, port, path_temp);
             AXIS2_FREE(env->allocator, tmp_url_str);
+            AXIS2_FREE(env->allocator, path_temp);
             return ret;
         }
     }
@@ -235,9 +244,14 @@
         {
             if (axutil_strlen(path) > 0)
             {
+                axis2_char_t *path_temp = NULL;
+
+                path_temp = axutil_strdup(env, path);
+                *path = '\0';
                 /* here we have protocol + host + port + path */
-                ret = axutil_url_create(env, protocol, host, port, path);
+                ret = axutil_url_create(env, protocol, host, port, path_temp);
                 AXIS2_FREE(env->allocator, tmp_url_str);
+                AXIS2_FREE(env->allocator, path_temp);
                 return ret;
             }
             else



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org