Switch CGI stdout to binary on windows
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Tue, 13 Feb 2007 06:50:00 -0200
changeset 4076 5a89c61c189c
parent 4075 31a679ae7eef
child 4077 1305ba7dee88
Switch CGI stdout to binary on windows Problem diagnosed by Andrei Vermel.
mercurial/hgweb/wsgicgi.py
--- a/mercurial/hgweb/wsgicgi.py
+++ b/mercurial/hgweb/wsgicgi.py
@@ -9,8 +9,10 @@
 # http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side
 
 import os, sys
+from mercurial import util
 
 def launch(application):
+    util.set_binary(sys.stdout)
 
     environ = dict(os.environ.items())
     environ['wsgi.input'] = sys.stdin