hosting hg with PyISAPIe on IIS7(python ISAPI extension)

ruby rubik at sina.com
Mon Apr 12 23:06:13 CDT 2010


On Mon, Apr 12, 2010 at 5:03 PM, Sune Foldager <cryo at cyanite.org> wrote:
> On 12-04-2010 06:03, ruby wrote:
>>
>> hosting hg with PyISAPIe on IIS7(python ISAPI extension)
>> someone knows how to host hg with PyISAPIe on IIS7 (python ISAPI
>> extension)?
>
> As Matt Hawley also replied, I would recomend using isapi-wsgi and following
> the guide he links to. This method is relatively easy to follow[1] and has
> proven to work and scale in production environments.
>
>> I initially tried isapi-wsgi, but I didn’t have much luck setting it up
>> (I gave up fairly quickly though).
>> It also depended on “Mark Hammond’s Python win32 isapi extension”
>> – and I was trying to keep the amount of packages installed and added
>> to a minimum. I therefore chose to use PyISAPIe which has no dependencies,
>> and only requires a DLL and a folder containing a few .py files.
>
> Well, pywin32 (which contain the isapi feature you describe above) is pretty
> much a "must have" if you use python on Windows anyway, and Mercurial uses
> it as well, so it's a very reasonable dependency.
>
> /Sune
>
> [1] Although if you plan on using SSL, there is a small bug in isapi-wsgi
> which you'll need to manually fix for now. Below is the relevant snip from a
> mail I sent to Matt Hawley:
>
>> In the file isapi_wsgi.py (in c:\python26\lib\site-packages), in the
>> function add_cgi_vars, around line 394 (in my version):
>>
>>        required_cgienv_vars = ['REQUEST_METHOD', 'SCRIPT_NAME',
>>                                'PATH_INFO', 'QUERY_STRING',
>>                                'CONTENT_TYPE', 'CONTENT_LENGTH',
>>                                'SERVER_NAME', 'SERVER_PORT',
>>                                'SERVER_PROTOCOL', 'REMOTE_ADDR'
>>                                ]
>>
>> If it looks like that, it's buggy. You need to add 'HTTPS' to that list
>> in order to make it work :-).
>
>

hi,

C:\repos\test_clone>hg push https://localhost:81/test
abort: error: _ssl.c:480: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol


have changed line 394 from
'SERVER_PROTOCOL', 'REMOTE_ADDR' to:
'SERVER_PROTOCOL', 'REMOTE_ADDR','HTTPS'

deleted isapi_wsgi.pyc and restarted iis and regenerated isapi_wsgi.pyc,but

nothing changed. ssl pushing still not work.




--
so, no one using PyISAPIe ?


More information about the Mercurial mailing list