Merge no-utf7-4900
commitcd65498575ff91bb4bff3fe308c0017697cfc286
authorglyph <glyph@bbbe8e31-12d6-0310-92fd-ac37d47ddeeb>
Tue, 22 Mar 2011 21:23:37 +0000 (22 21:23 +0000)
committerglyph <glyph@bbbe8e31-12d6-0310-92fd-ac37d47ddeeb>
Tue, 22 Mar 2011 21:23:37 +0000 (22 21:23 +0000)
tree185c2c7267cc32ed6e23847b8950b38cba5f9ba6
parent14428d996725f66ba1422cbb1bd87dbdbd253a54
Merge no-utf7-4900

Author: glyph

Reviewer: mwh

Fixes: #4900

This change makes error pages and directory listings explicitly set their
encodings in the content-type HTTP header, which should prevent certain
misguided browsers from potentially mis-detecting the encoding and allowing for
inclusion of invalid / insecure content from users.

git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@31388 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
twisted/web/resource.py
twisted/web/static.py
twisted/web/test/test_resource.py
twisted/web/test/test_static.py
twisted/web/test/test_util.py
twisted/web/topfiles/4900.bugfix [new file with mode: 0644]
twisted/web/util.py