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

Robert Lazarski resolved AXIS2C-1564.
-------------------------------------
    Fix Version/s: 2.0.0
                       (was: 1.7.0)
       Resolution: Fixed

   The URI parser was designed only for URLs (scheme://host:port/path) and
   failed to parse URNs which use a different format (urn:NID:NSS).

   URNs have the format "urn:<namespace-id>:<namespace-specific-string>"
   without the "://" after the scheme, and the namespace-specific string
   can contain multiple colons (e.g., urn:ietf:rfc:2648).

   Changes:
   - Detect URN scheme (case-insensitive "urn") before checking for "://"
   - For URNs, store "urn" as scheme and everything after "urn:" as path
   - URNs correctly have no hostname or port

   This enables proper interaction with systems like ebXML registry/repository
   that use URN-formatted status codes in responses.



> axutil_uri_parse_string() only parses URLs, not URIs
> ----------------------------------------------------
>
>                 Key: AXIS2C-1564
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1564
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.6.0
>            Reporter: Elliot Silver
>            Priority: Major
>             Fix For: 2.0.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> axutil_uri_parse_string() appears designed to handle parsing of URLs, not 
> generic URIs (which consist of both URLs and URNs). A URN consists of a 
> scheme ("urn") followed by a colon, a namespace, another colon an then a name 
> within that namespace. The name itself may contain further colons.
> It appears that axutil_uri_parse_string is expecting that a second colon in 
> the input string to indicate the start of the port number 
> (http://somehost:port/blah), and if that string can't be converted to a 
> number, the uri is invalid. With a URN this isn't the case 
> (urn:ietf:rfc:2648). Unfortunately, the failure isn't communicated upwards. 
> axutil_uri_parse_string() should be modified to accept both urls and urns, 
> and the API updated appropriately (when called on a urn, 
> axutil_uri_get_port() should return an error value, etc.). a new function to 
> determine if the uri is a urn or url should be added, and new functions to 
> access the urn specific components added.
> In my particular case, the incorrect parsing is hampering interaction with an 
> ebXML registry/repository, which indicates operation status in the form of a 
> uri attribute in the returned structure.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to