fix handling of multiple Content-type headers
This can happen if an error happens while sending
application/mercurial-0.1 content. The error page will
be sent resulting (for at least lighttpd) in the following
headers:
Content-type: application/mercurial-0.1
Content-type: text/html
which result in req.proto = 'application/mercurial-0.1, text/html'
fix issue344
#header#
<title>{repo|escape}: {file|escape}@{node|short} (annotated)</title>
<link rel="alternate" type="application/rss+xml"
href="{url}rss-log" title="RSS feed for #repo|escape#">
</head>
<body>
<div class="page_header">
<a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="{url}summary{sessionvars%urlparameter}">#repo|escape#</a> / annotate
</div>
<div class="page_nav">
<a href="{url}summary{sessionvars%urlparameter}">summary</a> |
<a href="{url}shortlog{sessionvars%urlparameter}">shortlog</a> |
<a href="{url}log{sessionvars%urlparameter}">changelog</a> |
<a href="{url}tags{sessionvars%urlparameter}">tags</a> |
<a href="{url}file/#node|short##path|urlescape#{sessionvars%urlparameter}">manifest</a> |
<a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> |
<a href="{url}file/{node|short}/#file|urlescape#{sessionvars%urlparameter}">file</a> |
<a href="{url}log/{node|short}/#file|urlescape#{sessionvars%urlparameter}">revisions</a> |
annotate |
<a href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> |
<a href="{url}raw-annotate/{node|short}/#file|urlescape#">raw</a><br/>
</div>
<div class="title">#file|escape#</div>
<div class="title_text">
<table>
<tr>
<td class="metatag">changeset #rev#:</td>
<td><a href="{url}rev/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>
#parent%fileannotateparent#
#child%fileannotatechild#
<tr>
<td class="metatag">manifest:</td>
<td><a href="{url}file/#node|short#{sessionvars%urlparameter}">#node|short#</a></td></tr>
<tr>
<td class="metatag">author:</td>
<td>#author|obfuscate#</td></tr>
<tr>
<td class="metatag">date:</td>
<td>#date|date# (#date|age# ago)</td></tr>
<tr>
<td class="metatag">permissions:</td>
<td>#permissions|permissions#</td></tr>
</table>
</div>
<div class="page_path">
{desc|strip|escape|addbreaks}
</div>
<div class="page_body">
<table>
#annotate%annotateline#
</table>
</div>
#footer#