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/03 15:15:43 UTC

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

Author: senaka
Date: Mon Mar  3 06:15:43 2008
New Revision: 633090

URL: http://svn.apache.org/viewvc?rev=633090&view=rev
Log:
Fixing JIRA Issue AXIS2C-1032

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=633090&r1=633089&r2=633090&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/url.c (original)
+++ webservices/axis2/trunk/c/util/src/url.c Mon Mar  3 06:15:43 2008
@@ -98,7 +98,7 @@
     axis2_char_t *port_str = NULL;
     axis2_char_t *server = NULL;
     axis2_char_t *params = NULL;
-    int port = -1;
+    int port = 0;
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, str_url, NULL);
@@ -139,6 +139,16 @@
         AXIS2_FREE(env->allocator, tmp_url_str);
         return ret;
     }
+    params = strchr(server, '?');
+    if (!params)
+    {
+        params = strchr(server, '#');
+    }
+    if (params)
+    {
+        *params = '\0';
+    }
+
     port_str = strchr(server, ':');
     if (!port_str)
     {
@@ -155,11 +165,6 @@
         if (!path)
         {
             /* No path - assume def path ('/') */
-            params = strchr(server, '?');
-            if (params)
-            {
-                *params = '\0';
-            }
             /* here we have protocol + server + def port + def path */
             ret = axutil_url_create(env, protocol, server, port, "/");
             AXIS2_FREE(env->allocator, tmp_url_str);
@@ -168,11 +173,6 @@
         else
         {
             *path++ = '\0';
-            params = strchr(path, '?');
-            if (params)
-            {
-                *params = '\0';
-            }
             /* here we have protocol + server + def port + path */
             ret = axutil_url_create(env, protocol, server, port, path);
             AXIS2_FREE(env->allocator, tmp_url_str);
@@ -234,10 +234,8 @@
         AXIS2_FREE(env->allocator, url->path);
         url->path = NULL;
     }
-    url->port = -1;
 
     AXIS2_FREE(env->allocator, url);
-
     return;
 }
 



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