From b5420dc7c52edb05b8ac97e192939a11b3fe14a8 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Sat, 14 Dec 2002 16:09:51 +0000 Subject: [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 --- url.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'url.c') diff --git a/url.c b/url.c index fd328c3..8de86a3 100644 --- a/url.c +++ b/url.c @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.59 2002/12/14 15:18:39 ukai Exp $ */ +/* $Id: url.c,v 1.60 2002/12/14 16:09:51 ukai Exp $ */ #include "fm.h" #include #include @@ -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); -- cgit v1.2.3