[Python3] Fix #1445: Safe decoding of response content with try-except#1560
[Python3] Fix #1445: Safe decoding of response content with try-except#1560POD666 wants to merge 4 commits intoOpenAPITools:masterfrom
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.shand./bin/security/{LANG}-petstore.shif 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