Author: jmb
Date: Sun Nov 22 17:25:18 2009
New Revision: 9703
URL:
http://source.netsurf-browser.org?rev=9703&view=rev
Log:
Treat decomposed URLs with no path component as being for the path "/".
Modified:
trunk/netsurf/content/urldb.c
Modified: trunk/netsurf/content/urldb.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/content/urldb.c?rev=9703&...
==============================================================================
--- trunk/netsurf/content/urldb.c (original)
+++ trunk/netsurf/content/urldb.c Sun Nov 22 17:25:18 2009
@@ -1915,6 +1915,9 @@
/* generate plq */
if (components.path)
len += strlen(components.path);
+ else
+ len += SLEN("/");
+
if (components.query)
len += strlen(components.query) + 1;
@@ -1931,7 +1934,11 @@
if (components.path) {
strcpy(copy, components.path);
copy += strlen(components.path);
- }
+ } else {
+ strcpy(copy, "/");
+ copy += SLEN("/");
+ }
+
if (components.query) {
*copy++ = '?';
strcpy(copy, components.query);