-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
curl no longer accepts a space in a url, but "dict" protocol doesn't allow %20 #10298
Comments
curl deals in URLs and URLs don't allow spaces, so if they're allowed, spaces must be % encoded. However, RFC2229 doesn't define a URL format for sending the SHOW DB command. If it worked in curl in the past, it was a happy accident. |
Don't agree here, and I was afraid for this answer:
|
What part don't you agree with? The RFC's lack of specification of SHOW DB in
URL format? Or curl's strict adherence to the RFC? It sounds like you're
asking that curl support an undocumented URL specification, which is fine, but
you need to be clear what you're asking.
The curl project doesn't generally create its own URL formats, although it's
been forced to in a few cases in the past. How does other software expose this
other functionality? Is there a de facto extended URL format that other
dict programs agree on in handling this feature?
|
What I meant was that the dict protocol is supported by curl. Mind you, there is a undocumented feature which allows the commands (which I didn't know before). Which is to replace "<space>" with ":" e.g.:
For me this workaround is good enough. But for 'curl' I think you should choose between the above two options. |
And I'm saying that the fact that it used to work was likely an accident. It's
probably worth supporting other commands, but some thought needs to be given to
how. Allowing -X (or possibly -Q) would be a cleaner way of supporting other
commands that's more in the spirit of how curl operates.
|
Perhaps it might make sense to have curl have an option to translate
would result in a URL |
A new option really isn't necessary. If we decide to preserve the old
behaviour, then curl can just decode the URL path itself before sending it to
the server. It's just that this isn't a valid dict URL so all bets are off in
how it's handled.
|
I guess it's too big a deal to ask all of the Dict server project to fix their URLs to conform to modern URL rules. :( |
The fact that curl doesn't URL decode the path when using it for DICT looks like a bug to me. |
I was thinking about this and, from a curl perspective doing this with |
I personally wonder how many software products could handle the embedded space cleanly in a URL. Probably nothing in the Office suite or browsers. |
From my view it is not actually a question specifically about space or %20, but about treating URL encoded paths correctly in general for DICT: As described above, this command line and URL work: As per how URLs works, we should then be able to also pass this with parts of the path URL-encoded, like if we encode the colon as
|
Reported-by: dekerser on github Fixes curl#10298 Closes curl#10354
So new curl versions don't accept a space, but do support the dict protocol:
But the DICT protocol requires the space, and doesn't allow a "%20"
So this works for older versions:
Shouldn't there be an exception for the DICT protocol?
The text was updated successfully, but these errors were encountered: