-
Notifications
You must be signed in to change notification settings - Fork 91
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
Special characters in path parameters not handled correctly #117
Comments
Thanks for the investigation, it's very clear. I think it's bug since every control characters in url should be escaped. The fix would be included in next release. |
mission-liao
added a commit
that referenced
this issue
Apr 15, 2017
- #117 - also clean up for io.Request.reset
mission-liao
added a commit
that referenced
this issue
Apr 15, 2017
I saw that you made a fix here and release V0.8.28 - I took that version and the fix seems to work great. Thanks for fixing and the quick turnaround! |
I should update a comment in issue board directly. |
mission-liao
added a commit
to pyopenapi/pyopenapi
that referenced
this issue
Aug 12, 2017
- pyopenapi/pyswagger#117 - also clean up for io.Request.reset
mission-liao
added a commit
to pyopenapi/pyopenapi
that referenced
this issue
Aug 12, 2017
[fix] missing body parameter when referenced from “parameters” field - pyopenapi/pyswagger#116 - pyopenapi/pyswagger#119 special characters in path parameters not handled correctly - pyopenapi/pyswagger#117 query parameter doesn't pass to Webapp2's client - pyopenapi/pyswagger#114
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Firstly - thanks for creating
pyswagger
!I'm having issues using URL special characters (e.g.
?
,/
etc.) in path parameters withpyswagger
.Do you agree
pyswagger
should be URL quoting these parameters with e.g. this function before making requests?As an example, if I try out the swagger UI here and try the
GET /user/{username}
operation with usernameasd?asd
, the request made is:GET http://petstore.swagger.io/v2/user/asd%3Fasd
.Now try the same thing with
pyswagger
, e.g.:and
pyswagger
does exactlyGET /v2/user/asd?asd
which is really aGET
for usernameasd
with a query parameter.Looking at the code, I think
pyswagger
should be doing some quoting of path parameters around here.pyswagger
does handle query parameters correctly (I thinkrequests
is actually encoding them because they are passed to it separately, butrequests
can't encode the path as it's provided as one string so relies onpyswagger
encoding the right parts):Results in
GET /v2/user/login?username=asd%3Fasd&password=asd%2Fasd
the same as if you use the swagger UI for/user/login
with the same parameters.The text was updated successfully, but these errors were encountered: