summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcovener <covener@13f79535-47bb-0310-9956-ffa450edef68>2009-01-07 20:39:01 +0000
committercovener <covener@13f79535-47bb-0310-9956-ffa450edef68>2009-01-07 20:39:01 +0000
commit7f782427afc12a529d58f99522b7ea1328902f62 (patch)
tree22deff5896d1b635caa9e8e18bef1aadb346fe5c
parentce47b73c72c5b6ca5f794335c2c3655b5c027272 (diff)
downloadlibapr-util-7f782427afc12a529d58f99522b7ea1328902f62.tar.gz
Correct documentation of apr_uri_parse() and add a test
for the current and agreed-upon behavior. PR44761 Reported by: Lieven Govaerts <lgo mobsol.be> Contributed by: Dan Poirier <poirier pobox.com> Reviewed by: covener git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@732476 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/apr_uri.h2
-rw-r--r--test/testuri.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/apr_uri.h b/include/apr_uri.h
index 99db4d96..02908a9d 100644
--- a/include/apr_uri.h
+++ b/include/apr_uri.h
@@ -95,7 +95,7 @@ struct apr_uri_t {
char *hostname;
/** port string (integer representation is in "port") */
char *port_str;
- /** the request path (or "/" if only scheme://host was given) */
+ /** the request path (or NULL if only scheme://host was given) */
char *path;
/** Everything after a '?' in the path, if present */
char *query;
diff --git a/test/testuri.c b/test/testuri.c
index 5ac5c5f2..ef433888 100644
--- a/test/testuri.c
+++ b/test/testuri.c
@@ -92,6 +92,10 @@ struct aup_test aup_tests[] =
0, "http", "sonyamt@[fe80::1]", "sonyamt", NULL, "fe80::1", NULL, "/filespace/", "arg1=store", NULL, 0
},
{
+ "http://localhost",
+ 0, "http", "localhost", NULL, NULL, "localhost", NULL, NULL, NULL, NULL, 0
+ },
+ {
"//www.apache.org/",
0, NULL, "www.apache.org", NULL, NULL, "www.apache.org", NULL, "/", NULL, NULL, 0
},