mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fix handling of links using file://localhost/
A simple "update" of Hugo Haas' patch posted for bug 107. This of course also affects the (undocumented?) feature of file:// refering to the local directory in that directories named "localhost" can no longer be displayed using file://localhost. Nobody should do that anyway.
This commit is contained in:
parent
0ac97979a2
commit
f33d9b004d
@ -250,6 +250,13 @@ parse_uri(struct uri *uri, unsigned char *uristring)
|
||||
datalen = strlen(prefix_end);
|
||||
}
|
||||
|
||||
/* A bit of a special case, but using the "normal" host
|
||||
* parsing seems a bit scary at this point. (see bug 107). */
|
||||
if (datalen > 9 && !strncasecmp(prefix_end, "localhost/", 10)) {
|
||||
prefix_end += 9;
|
||||
datalen -= 9;
|
||||
}
|
||||
|
||||
uri->data = prefix_end;
|
||||
uri->datalen = datalen;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user