﻿id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
4722	post_process_request not preserve content_type, which cause text/plain templates fail to render.	jiangxin	jiangxin	"post_process_request in traccosign/accountldap.py carelessly set content_type to None. It's bad if template is not a html template but a text template.

This bug cause plain text output of source code revision log raise a exception:
{{{
Traceback (most recent call last):
  File ""/usr/lib/python2.5/site-packages/trac/web/main.py"", line 459, in _dispatch_request
    dispatcher.dispatch(req)
  File ""/usr/lib/python2.5/site-packages/trac/web/main.py"", line 237, in dispatch
    content_type)
  File ""/usr/lib/python2.5/site-packages/trac/web/chrome.py"", line 740, in render_template
    template = self.load_template(filename, method=method)
  File ""/usr/lib/python2.5/site-packages/trac/web/chrome.py"", line 724, in load_template
    return self.templates.load(filename, cls=cls)
  File ""/var/lib/python-support/python2.5/genshi/template/loader.py"", line 227, in load
    filename, encoding=encoding)
  File ""/var/lib/python-support/python2.5/genshi/template/loader.py"", line 265, in _instantiate
    allow_exec=self.allow_exec)
  File ""/var/lib/python-support/python2.5/genshi/template/markup.py"", line 67, in __init__
    allow_exec=allow_exec)
  File ""/var/lib/python-support/python2.5/genshi/template/base.py"", line 406, in __init__
    raise TemplateSyntaxError(e.msg, self.filepath, e.lineno, e.offset)
TemplateSyntaxError: not well-formed (invalid token): line 1, column 1 (/usr/lib/python2.5/site-packages/trac/versioncontrol/templates/revisionlog.txt, line 1)
}}}"	defect	closed	highest	TracCoSignPlugin	blocker	fixed			0.11
