Mercurial > hg-stable
changeset 8224:1075f5c1b3fa
hgweb: pre-init mimetypes module (fixes ugly bug in python-2.6.2 mimetypes)
The ugly initialization hack in mimetypes' initialization procedure can make
hg serve hit the maximum recursion depth when in threaded mode.
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 27 Apr 2009 16:29:26 +0200 |
parents | 02145b700fe4 |
children | 46293a0c7e9f |
files | mercurial/hgweb/server.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/server.py Mon Apr 27 16:26:31 2009 +0200 +++ b/mercurial/hgweb/server.py Mon Apr 27 16:29:26 2009 +0200 @@ -283,6 +283,9 @@ else: handler = _hgwebhandler + # ugly hack due to python issue5853 (for threaded use) + import mimetypes; mimetypes.init() + try: if use_ipv6: return IPv6HTTPServer((address, port), handler)