diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-12-14 16:09:51 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-12-14 16:09:51 +0000 |
commit | b5420dc7c52edb05b8ac97e192939a11b3fe14a8 (patch) | |
tree | c6e1823afda9ab0816cdcdb665a6c6894d03370b /url.c | |
parent | [w3m-dev 03571] base=0 -> 10 in toNumber() (diff) | |
download | w3m-b5420dc7c52edb05b8ac97e192939a11b3fe14a8.tar.gz w3m-b5420dc7c52edb05b8ac97e192939a11b3fe14a8.zip |
[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 (limited to 'url.c')
-rw-r--r-- | url.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 <sys/types.h> #include <sys/socket.h> @@ -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); |