Skip to content
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

Space character in url path encoded as + instead of %20 #278

Closed
jakul opened this issue Jun 6, 2018 · 3 comments
Closed

Space character in url path encoded as + instead of %20 #278

jakul opened this issue Jun 6, 2018 · 3 comments
Assignees

Comments

@jakul
Copy link

jakul commented Jun 6, 2018

Recent versions of Bravado have started encoding space characters in urls as + -> e.g. /path/to/resource/resource+name instead of /path/to/resource/resource%20name.

I haven't been able to find concrete documentation to say that that encoding is against the standard, but a couple of Stack overflow comments imply that plus-encoding is required for query params, but path params should use %20.

The default behaviour of Flask servers will decode %20 by default but not +.

This was introduced by #238, which switched to using urllib.parse.quote_plus instead of urllib.parse.quote.

I think this issue needs 2 things:

  1. To gain consensus that the desired behaviour is to encode spaces with %20 instead of +
  2. Code to do that

@sjaensch @macisamuele Your input would be appreciated as you worked on the original issue.

@sjaensch sjaensch self-assigned this Jun 6, 2018
@sjaensch
Copy link
Contributor

sjaensch commented Jun 6, 2018

Thanks @jakul for the report! I'm looking into it.

@sjaensch
Copy link
Contributor

sjaensch commented Jun 6, 2018

The fix is released in version 5.0.3.

@jakul
Copy link
Author

jakul commented Jun 7, 2018

Thanks for the super quick fix @sjaensch !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants