posativ/acrylamid — pull request #126 by sashahart (2013-02-28 07:47:48+00:00)
Title: fix TypeError from `acrylamid view` in Python 3

When a browser asks acrylamid's server for something that doesn't exist in
output (e.g.: favicon.ico), an IOError bubbles up from http.server.
In the course of handling this, acrylamid.lib.httpd:end_headers (line 47) tries
to write a Cache-Control header. However, the string arg is of type str,
yielding:

TypeError: 'str' does not support the buffer interface

that's really because write() is expecting a bytestring, like b''.
So, this change just adds that b prefix before the string literal.