Mercurial: Why do I get a 404 error when pushing to a repository whose URL I can hit in a browser?

前端 未结 5 1591
灰色年华
灰色年华 2021-02-05 08:43

I have a Mercurial repository that I can see just fine if I navigate to it in a browser, but when I try to do a push, with my default path set to the same URL that I visit in th

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 08:49

    We suddenly started getting this error on our main Mercurial repository, hosted under IIS on Windows 2008. When your repository has too many heads, Mercurial POSTs query strings longer than IIS chooses to handle.

    You can tell by looking at the sub-status code of the failed request in the IIS logs (it's usually the number after the normal HTTP status code). In this situation, IIS returns a sub-status of 15 which means the query string is too long. Don't forget to check your sub-status codes!

    To fix the issue, you'll need to increase IIS's maxiumum query string length:

     # Get the current query string size limit
     c:\windows\system32\inetsrv\appcmd list config /section:requestFiltering -text:requestLimits.maxQueryString
    
     # Set the new query string size limit
     c:\windows\system32\inetsrv\appcmd set config /section:requestFiltering /requestLimits.maxQueryString:
    

提交回复
热议问题