-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[Python3] Fix #1445: Safe decoding of response content with try-except #1560
Conversation
I'm not sure if this approach is safe. Maybe we can pass binary data if we detect that raw content is returned (based on returned headers or a model). Definitely integral tests for it are needed. We have a use case with uploading file but downloading is not tested. |
What about using |
I guess a better option is to keep response data in bytes as long as possible. |
Quick qusetion. Will this Fix be in the upcoming 4.0.0 Release? |
Does this code path know anything about/use the mime type under the consumes key in the swagger spec? Those mime types can include utf-8 etc definition. |
Updated the Python Petstore samples. Let's see if the tests pass. |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.4.x
,4.0.x
. Default:master
.Description of the PR
#1445