﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20961	response.write(img_buffer) does not work on Python 3	epandurski@…	nobody	"I have the following code in Python 2:
{{{
        response = HttpResponse(content_type='image/jpeg')
        response['Content-Encoding'] = 'identity'
        response['Content-Length'] = len(img_buffer)
        response['Cache-Control'] = ""max-age=1209600""
        response.write(str(img_buffer))
        return response
}}}
I figured out that with Python 3 is should be:
{{{
        response = HttpResponse(content_type='image/jpeg')
        response['Content-Encoding'] = 'identity'
        response['Content-Length'] = len(img_buffer)
        response['Cache-Control'] = ""max-age=1209600""
        response.write(img_buffer)  # I tried img_buffer.tobytes() too!!!
        return response
}}}

But I get this error:

http://dpaste.com/hold/1354227/
"	Bug	closed	Python 3	dev	Release blocker	fixed			Accepted	0	0	0	0	0	0
