Skip to content
Myr

flask view function may return bytes/str/unicode

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thomas Waldmann · committed by Thomas Waldmann · parent 51042f4 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:flask/app.py+1 added-1 removed
1549 unmodified lines
1550 # When we create a response object directly, we let the constructor1551 # set the headers and status. We do this because there can be1552 # some extra logic involved when creating these objects with1553 # specific values (like default content type selection).1554 if isinstance(rv, string_types):1554 if isinstance(rv, string_types + (bytes, )):1555 rv = self.response_class(rv, headers=headers, status=status)1556 headers = status = None1557 else:1558 rv = self.response_class.force_type(rv, request.environ)
257 unmodified lines