apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lieven Govaerts <svn...@mobsol.be>
Subject [PATCH] fix for issue #44761
Date Sun, 06 Apr 2008 19:22:26 GMT

Please find attached a patch that solves issue #44761 
(https://issues.apache.org/bugzilla/show_bug.cgi?id=44761).

The issue is about apr_uri_parse not setting the uri.path variable to 
'/' when the url is something like "http://localhost".

I've based the fixes for apr_uri_parse and apr_uri_unparse on the 
comment of the path member of apr_uri_t in apr_uri.h:
/** the request path (or "/" if only scheme://host was given) */

So, apr_uri_parse now sets uri.path to "/" if no path part was found in 
the url. If in apr_uri_unparse the path is "/", it's not added to the 
url when the url is of type scheme://host.

Lieven

Log message:
[[[
Fix for issue #44761. The relative path of an url is '/' when the url
is of type scheme://host and the path part is empty.

*  test/testuri.c
    (aup_tests): Add new test case 'http://localhost'.
*  uri/apr_uri.c
    (apr_uri_unparse): When unparsing an uri structure, the path is '/'
     and the url is of type scheme://host, don't add the path.
    (apr_uri_parse): When parsing an url of type scheme://host, set
     uri.path to "/".
]]]

Mime
View raw message