Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm hitting a really annoying problem with IIS 7. I've setup my web.config by the books as follows:

<?xml version="1.0" encoding="UTF-8"?>
            <add name="Python" path="*.cgi" verb="*" modules="CgiModule" scriptProcessor="C:\Python27\python.exe -u &quot;%s&quot;" resourceType="Unspecified" requireAccess="Script" />
                <!-- maxAllowedContentLength is in bytes (B)  -->
                <requestLimits maxAllowedContentLength="1073741824" /> <!-- 1GB -->
                <rule name="rewrite to hgwebdir" patternSyntax="Wildcard">
                    <match url="*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <action type="Rewrite" url="hgweb.cgi/{R:1}" />
        <!-- maxRequestLength is in kilobytes (KB)  -->
        <httpRuntime maxRequestLength="1048576" /> <!-- 1GB -->

When I POST to the CGI script (it's hgweb for Mercurial via Python) via HTTP everything is fine - no problems whatsoever.

However, when I POST to the script via HTTPS (SSL) I'm still capped at the default upload limit of 30MB. This doesn't make any sense to me. What is going on?!

share|improve this question
Follow this question in the IIS forums as well:… – jocull May 8 '13 at 14:18
up vote 0 down vote accepted

This is an incompatibility in the SSL module of Python 2.7.3+.

Bug documented here on the TortoiseHg site, but it applies to all platforms pushing into IIS over HTTPS.

There are more details in my related StackOverflow post about this:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.