0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00

Reinstate "canonicalization" of path names for file URIs

This reverts commit 4f0aaa166e245aba08c574c0b4b8ae32bbc535dc
and insert check for the "//" -> "/" change only to occur for
file:// URIs. This fixes the recent reports on broken handling
of relative file URIs starting with "..".
This commit is contained in:
Jonas Fonseca 2007-09-09 18:03:47 +02:00
parent cdf2d8181c
commit 58b3b1e752

View File

@ -766,6 +766,11 @@ normalize_uri(struct uri *uri, unsigned char *uristring)
continue; continue;
} }
} else if (is_uri_dir_sep(uri, src[1]) &&
uri->protocol == PROTOCOL_FILE) {
/* // - ignore first '/'. */
src += 1;
continue;
} }
/* We don't want to access memory past the NUL char. */ /* We don't want to access memory past the NUL char. */