tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 342712b9ef12c0234def9c2b4eb5c63f54c8bb5b
parent 4e02d02076f4ffe51a2da8415d93ec983208a7c7
Author: Nick Mathewson <nickm@torproject.org>
Date:   Tue,  5 Sep 2017 15:02:16 -0400

Make url-canonicalizer canonicalize correctly.

Diffstat:
Msrc/or/directory.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/or/directory.c b/src/or/directory.c @@ -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; }