mirror of https://github.com/python/cpython.git
Revert r88197. I'll refix correctly once there is a test.
This commit is contained in:
parent
14eb4c356e
commit
bdd2d93bfe
|
@ -377,11 +377,8 @@ def _write_headers(self, msg):
|
||||||
def _handle_text(self, msg):
|
def _handle_text(self, msg):
|
||||||
# If the string has surrogates the original source was bytes, so
|
# If the string has surrogates the original source was bytes, so
|
||||||
# just write it back out.
|
# just write it back out.
|
||||||
payload = msg.get_payload()
|
if _has_surrogates(msg._payload):
|
||||||
if payload is None:
|
self.write(msg._payload)
|
||||||
return
|
|
||||||
if _has_surrogates(payload):
|
|
||||||
self.write(payload)
|
|
||||||
else:
|
else:
|
||||||
super(BytesGenerator,self)._handle_text(msg)
|
super(BytesGenerator,self)._handle_text(msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue