axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senaka Fernando (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2C-1021) uri port is never initialized to zero in axutil_uri_create().
Date Mon, 03 Mar 2008 10:08:50 GMT

     [ https://issues.apache.org/jira/browse/AXIS2C-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Senaka Fernando resolved AXIS2C-1021.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0

Fixed Issue

> uri port is never initialized to zero in axutil_uri_create().
> -------------------------------------------------------------
>
>                 Key: AXIS2C-1021
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1021
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.3.0
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> uri port is never initialized to zero in axutil_uri_create(). This causes problems in
axutil_uri_resolve_relative() which has a if check as,
>     if (!uri->port)
>     {
>         uri->port = base->port;
>     }
> Thus, the port of the resolved relative URI will always be garbage, if it didn't originally
have one. This badly affects axutil_uri_to_string() where there is a test for the default
port in a scheme as, 
> is_default_port = (uri->port_str == NULL || uri->port == 0 ||
>     uri->port ==
>     axutil_uri_port_of_scheme(uri->scheme));
> Obviously, uri->port_str != NULL if the base had a port, and due to this bug uri->port
!= 0. Also, since the value is garbage, 
> uri->port !=
>     axutil_uri_port_of_scheme(uri->scheme));
> Therefore, the port is always printed in the string representation even though it is
the default port or not.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message