You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by se...@apache.org on 2008/03/03 17:01:19 UTC
svn commit: r633147 - /webservices/axis2/trunk/c/util/src/uri.c
Author: senaka
Date: Mon Mar 3 08:01:18 2008
New Revision: 633147
URL: http://svn.apache.org/viewvc?rev=633147&view=rev
Log:
Fixing JIRA Issue AXIS2C-1026
Modified:
webservices/axis2/trunk/c/util/src/uri.c
Modified: webservices/axis2/trunk/c/util/src/uri.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/uri.c?rev=633147&r1=633146&r2=633147&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/uri.c (original)
+++ webservices/axis2/trunk/c/util/src/uri.c Mon Mar 3 08:01:18 2008
@@ -187,6 +187,9 @@
/** has the dns been resolved yet */
unsigned dns_resolved:1;
+
+ /** is it an IPv6 URL */
+ unsigned is_ipv6:1;
};
AXIS2_EXTERN axutil_uri_t *AXIS2_CALL
@@ -214,6 +217,7 @@
uri->fragment = NULL;
uri->hostent = NULL;
uri->port = 0;
+ uri->is_ipv6 = 0;
return uri;
}
@@ -421,6 +425,7 @@
*/
if (*hostinfo == '[')
{
+ uri->is_ipv6 = 1;
v6_offset1 = 1;
v6_offset2 = 2;
s = axutil_memchr(hostinfo, ']', uri_str - hostinfo);
@@ -525,6 +530,7 @@
*/
if (*hostinfo == '[')
{
+ uri->is_ipv6 = 1;
rsb = strchr(hostinfo, ']');
if (!rsb || *(rsb + 1) != ':')
{
@@ -663,6 +669,7 @@
{
uri->port = base->port;
}
+ uri->is_ipv6 = base->is_ipv6;
return uri;
}
@@ -727,6 +734,7 @@
new_uri->is_initialized = uri->is_initialized;
new_uri->dns_looked_up = uri->dns_looked_up;
new_uri->dns_resolved = uri->dns_resolved;
+ new_uri->is_ipv6 = uri->is_ipv6;
return new_uri;
}
@@ -779,7 +787,7 @@
const axis2_char_t *lbrk = "",
*rbrk = "";
- if (strchr(uri->hostname, ':'))
+ if (uri->is_ipv6)
{ /* v6 literal */
lbrk = "[";
rbrk = "]";
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org