More bytes I/O fixes

This commit is contained in:
Phillip J. Eby 2011-01-07 15:39:27 +00:00
parent eb05afdb33
commit 7a010e3932
1 changed files with 2 additions and 2 deletions

View File

@ -310,9 +310,9 @@ server.
elif not headers_sent:
# Before the first output, send the stored headers
status, response_headers = headers_sent[:] = headers_set
sys.stdout.write('Status: %s\r\n' % status)
sys.stdout.buffer.write('Status: %s\r\n' % status)
for header in response_headers:
sys.stdout.write('%s: %s\r\n' % header)
sys.stdout.buffer.write('%s: %s\r\n' % header)
sys.stdout.write('\r\n')
sys.stdout.buffer.write(data)