Skip to content

Commit

Permalink
Fix encoding issue with rfc822 messages (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
dilipped authored Apr 14, 2021
1 parent ca20945 commit a48cf52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apitools/base/py/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,9 @@ def _handle_text(self, msg):
return
self.write(msg._payload)

def _encode(self, s):
return s.encode('ascii', 'surrogateescape')

# Default body handler
_writeBody = _handle_text

Expand Down

0 comments on commit a48cf52

Please sign in to comment.