mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Make url-canonicalizer canonicalize correctly.
This commit is contained in:
parent
4e02d02076
commit
342712b9ef
@ -1971,7 +1971,9 @@ parse_http_url(const char *headers, char **url)
|
||||
}
|
||||
if (strcmpstart(*url, "/tor/")) {
|
||||
char *new_url = NULL;
|
||||
tor_asprintf(&new_url, "/tor/%s", *url);
|
||||
tor_asprintf(&new_url, "/tor%s%s",
|
||||
*url[0] == '/' ? "" : "/",
|
||||
*url);
|
||||
tor_free(*url);
|
||||
*url = new_url;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user