From: Leonardo Taccari Date: Thu, 23 Aug 2018 21:27:34 +0000 (+0200) Subject: gopher: Do not translate `?' to `%09' X-Git-Tag: curl-7_61_1~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f3c3cd08a5b252002a4abfb19780850fc51040e;p=curl gopher: Do not translate `?' to `%09' Since GOPHER support was added in curl `?' character was automatically translated to `%09' (`\t'). However, this behaviour does not seems documented in RFC 4266 and for search selectors it is documented to directly use `%09' in the URL. Apart that several gopher servers in the current gopherspace have CGI support where `?' is used as part of the selector and translating it to `%09' often leads to surprising results. Closes #2910 --- diff --git a/lib/gopher.c b/lib/gopher.c index b7c31b695..d65049969 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -93,18 +93,11 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) } else { char *newp; - size_t j, i; /* Otherwise, drop / and the first character (i.e., item type) ... */ newp = path; newp += 2; - /* ... then turn ? into TAB for search servers, Veronica, etc. ... */ - j = strlen(newp); - for(i = 0; i -"gopher://%HOSTIP:%GOPHERPORT/7/the/search/engine?query%20succeeded/1202" +"gopher://%HOSTIP:%GOPHERPORT/7/the/search/engine%09query%20succeeded/1202"