-
Notifications
You must be signed in to change notification settings - Fork 9.1k
curl commands containing spaces won't execute in Linux terminals #4263
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
Comments
Thanks for the report, but it would really help having an API definition that reproduces the problem. |
Here is a definition reproducing the issue: I thing the Possible solution will be on: |
Thank you Helder, that's the situation I was describing. |
I was looking at other chars that could be causing problems the |
@dotasek can you please clarify
what's |
curl expects that the URL is properly URL-encoded. The https://tools.ietf.org/html/rfc3986#section-2 explains what has to be encoded. |
Expected Behavior
The generated curl available in the UI should be immediately executable when it's copied to a terminal, even if the address contains spaces.
Current Behavior
On operations that contain spaces, the generated curl cannot be executed within a linux console.
For example, this operation:
POST /v1/commands/apps/list disabled
results in a 400 error if you try to execute the resulting curl:Possible Solution
Replacing the spaces with
%20
fixes the issue:Context
We are representing some underlying API that unfortunately allows spaces in its naming convention. Developers attempting to quickly script REST communications were held up.
The text was updated successfully, but these errors were encountered: