Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Allow writing bytes to browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Hetherington authored Sep 17, 2019
1 parent deb3444 commit e9e9eb6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions webapp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,6 @@ def write(self, text):
"""Appends a text to the response body."""
# webapp uses StringIO as Response.out, so we need to convert anything
# that is not str or unicode to string to keep same behavior.
if six.PY3 and isinstance(text, bytes):
text = text.decode(self.default_charset)

if not isinstance(text, six.string_types):
text = six.text_type(text)

Expand Down

0 comments on commit e9e9eb6

Please sign in to comment.