Skip to content

Commit

Permalink
rework PR #467 - don't attempt to validate streamed responses
Browse files Browse the repository at this point in the history
  • Loading branch information
cshorler committed Jun 25, 2020
1 parent bed4b95 commit e00e609
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions connexion/decorators/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,12 @@ def __call__(self, function):
"""

def _wrapper(request, response):
connexion_response = \
self.operation.api.get_connexion_response(response, self.mimetype)
self.validate_response(
connexion_response.body, connexion_response.status_code,
connexion_response.headers, request.url)
if not getattr(response, 'is_streamed', False):
connexion_response = \
self.operation.api.get_connexion_response(response, self.mimetype)
self.validate_response(
connexion_response.body, connexion_response.status_code,
connexion_response.headers, request.url)

return response

Expand Down

0 comments on commit e00e609

Please sign in to comment.