<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I should probably respond to the rest of the post as well, but...:<div><br><div><div>On Nov 26, 2011, at 11:52 AM, <a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Bitstream Vera Sans Mono'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">including the bytes in a page with a content type of "text/html".</span></span></blockquote></div><br></div><div>It's pretty much always wrong to give a page the content type of "text/html". &nbsp;Browsers will then guess the encoding based on wonky heuristics about the page, which in certain obscure cases can lead to security problems (see &lt;<a href="https://en.wikipedia.org/wiki/UTF-7#Security">https://en.wikipedia.org/wiki/UTF-7#Security</a>&gt;).</div><div><br></div><div>So, in addition to whatever other fix is done here, the encoding on the error page should be adjusted to be explicit about its character set.</div><div><br></div><div>-glyph</div><div><br></div></body></html>