New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not translate `?' to `%09' for GOPHER #2910

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@iamleot
Contributor

iamleot commented Aug 23, 2018

I have tried to dig in the lib/gopher.c history but unfortunately
apart the comment I was not able to find other rationales regarding
the ? -> %09 translation. AFAIK RFC 1436 predates URIs but RFC
4266 - that standardize gopher:// URIs does not contain any note
regarding a possible ? -> %09 translation and also in "Section
2.1 Gopher URL Syntax" for the search types it is documented to
just use %09 to separate <selector> and <search> fields.

At least geomyidae, PyGopherd and bucktooth supports CGI where the
? character is used and it is pretty common to find that in the
current gopherspace. Translating ? to %09 leads to surprising
results in these cases.

Thank you!

EDIT: Adjusted formatting (NFC)

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.
@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Aug 23, 2018

Member

I can't explain it. It came already in the commit 201637d that brought (back) gopher support to curl back in 2010...

Member

bagder commented Aug 23, 2018

I can't explain it. It came already in the commit 201637d that brought (back) gopher support to curl back in 2010...

@bagder

bagder approved these changes Aug 23, 2018

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Aug 24, 2018

Member

Thanks!

Member

bagder commented Aug 24, 2018

Thanks!

@bagder bagder closed this in 8f3c3cd Aug 24, 2018

@iamleot

This comment has been minimized.

Show comment
Hide comment
@iamleot

iamleot Aug 24, 2018

Contributor
Contributor

iamleot commented Aug 24, 2018

falconindy added a commit to falconindy/curl that referenced this pull request Sep 10, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment