commit 74c27157651184d5e4d6e67f3160f4451b1f5fca
parent d76d62057cb2203999ba85684075fb2a535e1384
Author: ukai <ukai>
Date: Sat, 14 Dec 2002 16:09:51 +0000
[w3m-dev 03573] Re: Bug#172851: w3m: In form, takes hostname as baseref for relative URI action
* url.c (parseURL): if empty is URL, base URL is used
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat:
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-15 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [w3m-dev 03573] Re: Bug#172851: w3m: In form, takes hostname as baseref for relative URI action
+ * url.c (parseURL): if empty is URL, base URL is used
+
2002-12-15 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03571] base=0 -> 10 in toNumber()
diff --git a/url.c b/url.c
@@ -675,6 +675,14 @@ parseURL(char *url, ParsedURL *p_url, ParsedURL *current)
p_url->query = NULL;
p_url->label = NULL;
+ /* RFC1808: Relative Uniform Resource Locators
+ * 4. Resolving Relative URLs
+ */
+ if (*url == '\0' && current) {
+ copyParsedURL(p_url, current);
+ return;
+ }
+
if (*url == '#') { /* label only */
if (current)
copyParsedURL(p_url, current);