[PATCH] Switch CGI stdout to binary on windows - fixes apacheissue

Andrei Vermel avermel at mail.ru
Tue Feb 13 09:23:59 UTC 2007


Yes, this works perfectly.
Thanks for showing how to do it properly.

Andrei

----- Original Message ----- 
From: "Alexis S. L. Carvalho" <alexis at cecm.usp.br>
To: <mercurial-devel at selenic.com>
Sent: Tuesday, February 13, 2007 11:53 AM
Subject: Re: [PATCH] Switch CGI stdout to binary on windows - fixes apacheissue


> Thus spake Andrei Vermel:
>> Switch CGI stdout to binary on windows
> 
> I've pushed the patch below to crew-stable - can you double-check that
> it also fixes this problem?
> 
> Thanks
> 
> Alexis
> 
> diff -r 31a679ae7eef -r 5a89c61c189c mercurial/hgweb/wsgicgi.py
> --- a/mercurial/hgweb/wsgicgi.py Fri Feb 09 20:50:41 2007 +0300
> +++ b/mercurial/hgweb/wsgicgi.py Tue Feb 13 06:50:00 2007 -0200
> @@ -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
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>



More information about the Mercurial-devel mailing list