[PATCH] Switch CGI stdout to binary on windows - fixes apache issue
Andrei Vermel
avermel at mail.ru
Mon Feb 12 09:59:44 UTC 2007
# HG changeset patch
# User "Andrei Vermel <avermel at mail.ru>"
# Date 1171274209 -10800
# Node ID d95b6ec7f5883a83976fc43f63aa4bfc9b0cce75
# Parent 122dc8922044666b7b3a7bc3fa78480dcd8b1d24
Switch CGI stdout to binary on windows
diff -r 122dc8922044 -r d95b6ec7f588 mercurial/hgweb/wsgicgi.py
--- a/mercurial/hgweb/wsgicgi.py Mon Feb 12 12:56:49 2007 +0300
+++ b/mercurial/hgweb/wsgicgi.py Mon Feb 12 12:56:49 2007 +0300
@@ -9,6 +9,10 @@
# http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side
import os, sys
+import msvcrt
+
+if sys.platform == "win32":
+ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
def launch(application):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgi_binary
Type: application/octet-stream
Size: 656 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20070212/b5ad3b79/attachment.obj>
More information about the Mercurial-devel
mailing list