From d591d8df94f7e7ff73f6367e79c912b8f9ed75f9 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 22 Nov 2009 23:25:18 +0000 Subject: Treat decomposed URLs with no path component as being for the path "/". svn path=/trunk/netsurf/; revision=9703 --- content/urldb.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'content') diff --git a/content/urldb.c b/content/urldb.c index 50c15810d..a3a75799a 100644 --- a/content/urldb.c +++ b/content/urldb.c @@ -1915,6 +1915,9 @@ struct path_data *urldb_find_url(const char *url) /* generate plq */ if (components.path) len += strlen(components.path); + else + len += SLEN("/"); + if (components.query) len += strlen(components.query) + 1; @@ -1931,7 +1934,11 @@ struct path_data *urldb_find_url(const char *url) if (components.path) { strcpy(copy, components.path); copy += strlen(components.path); + } else { + strcpy(copy, "/"); + copy += SLEN("/"); } + if (components.query) { *copy++ = '?'; strcpy(copy, components.query); -- cgit v1.2.3