Web Hosting on Microsoft IIS

Sune Foldager cryo at cyanite.org
Fri Apr 9 17:09:51 CDT 2010


On 09-04-2010 19:43, Matt Hawley wrote:
> Hi Sune,
> 
> Hoping you can help me here. We currently have SSL enabled at the IIS level. When we try and push, we get the message "ssl required". Is there possibly a bug in the script that is converting SSL to non-SSL (sorry, my python is uber rusty).

My guess is that this is caused by a bug in isapi_wsgi which I
discovered some time ago and emailed a patch to its maintainer. I am not
sure it's been included upstream or not, so you can see how your version
of the file looks. The problem is that it doesn't propagate the HTTPS
cgi environment variable, so Mercurial doesn't know it's running in SSL
mode.

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 :-).

/Sune


More information about the Mercurial mailing list