From 27924aa38c0099ada9695530206c7a4633d03c81 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 29 Jan 2011 15:17:42 +0000 Subject: Minor fix for path defaulting: retain rightmost / iff it's the first character in the path svn path=/trunk/netsurf/; revision=11524 --- test/urldbtest.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/urldbtest.c') diff --git a/test/urldbtest.c b/test/urldbtest.c index 4d9737a1b..3de24f3be 100644 --- a/test/urldbtest.c +++ b/test/urldbtest.c @@ -190,6 +190,11 @@ int main(void) assert(urldb_set_cookie("name=value\r\n", "http://www.example.org/foo/bar/baz/bat.html", NULL)); assert(urldb_get_cookie("http://www.example.org/foo/bar/baz/quux.htm")); + /* Defaulted path with no non-leaf path segments */ + assert(urldb_set_cookie("name=value\r\n", "http://no-non-leaf.example.org/index.html", NULL)); + assert(urldb_get_cookie("http://no-non-leaf.example.org/page2.html")); + assert(urldb_get_cookie("http://no-non-leaf.example.org/")); + /* Valid path (includes leafname) */ assert(urldb_set_cookie("name=value;Version=1;Path=/index.cgi\r\n", "http://example.org/index.cgi", NULL)); assert(urldb_get_cookie("http://example.org/index.cgi")); -- cgit v1.2.3