Author: senaka Date: Wed Mar 5 10:32:38 2008 New Revision: 633964 URL: http://svn.apache.org/viewvc?rev=633964&view=rev Log: Fixing JIRA Issue AXIS2C-1020
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=633964&r1=633963&r2=633964&view=diff ============================================================================== --- webservices/axis2/trunk/c/util/src/uri.c (original) +++ webservices/axis2/trunk/c/util/src/uri.c Wed Mar 5 10:32:38 2008 @@ -436,7 +436,22 @@ uri = NULL; goto end; } - uri->is_ipv6 = 1; + if ((*(hostinfo + 1) >= '0' && *(hostinfo + 1) <= '9') || + (*(hostinfo + 1) >= 'a' && *(hostinfo + 1) <= 'z') || + (*(hostinfo + 1) >= 'A' && *(hostinfo + 1) <= 'Z') || + (*(hostinfo + 1) == ':' && *(hostinfo + 2) == ':')) + { + uri->is_ipv6 = 1; + } + else + { + if (uri) + { + axutil_uri_free(uri, env); + } + uri = NULL; + goto end; + } v6_offset1 = 1; v6_offset2 = 2; s = axutil_memchr(hostinfo, ']', uri_str - hostinfo); @@ -454,7 +469,13 @@ s = NULL; /* no port */ } } - else if (*hostinfo == ':') + else if ((*hostinfo >= '0' && *hostinfo <= '9') || + (*hostinfo >= 'a' && *hostinfo <= 'z') || + (*hostinfo >= 'A' && *hostinfo <= 'Z')) + { + s = axutil_memchr(hostinfo, ':', uri_str - hostinfo); + } + else { if (uri) { @@ -462,10 +483,6 @@ } uri = NULL; goto end; - } - else - { - s = axutil_memchr(hostinfo, ':', uri_str - hostinfo); } if (!s) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]