Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 3867:2563ddf71cd7
Enabled over-riding of content-type in web interface (thanks John Mitchell)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 27 Aug 2007 10:27:31 +0000 |
| parents | 36eb9e8faf30 |
| children | fca0365521fc |
line wrap: on
line diff
--- a/roundup/cgi/client.py Fri Aug 24 05:31:13 2007 +0000 +++ b/roundup/cgi/client.py Mon Aug 27 10:27:31 2007 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.233 2007-01-16 10:16:08 schlatterbeck Exp $ +# $Id: client.py,v 1.234 2007-08-27 10:27:31 richard Exp $ """WWW request handler (also used in the stand-alone server). """ @@ -865,8 +865,9 @@ def write_html(self, content): if not self.headers_done: # at this point, we are sure about Content-Type - self.additional_headers['Content-Type'] = \ - 'text/html; charset=%s' % self.charset + if not self.additional_headers.has_key('Content-Type'): + self.additional_headers['Content-Type'] = \ + 'text/html; charset=%s' % self.charset self.header() if self.env['REQUEST_METHOD'] == 'HEAD':
