[PATCH] Defined REQUEST_URI on Microsoft IIS servers
Ezra Smith
ezrasmith at gmail.com
Wed Oct 31 15:00:24 UTC 2007
Apologies for the spam; apparently Outlook is quite adamant about formatting
my outgoing emails.
I'm now sending this from my Gmail account instead, where the formatting
isn't being changed.
-Ezra
=================================================================
# HG changeset patch
# User Ezra Smith <ezra.smith at bentley.com>
# Date 1193841248 14400
# Node ID ab23db2972325313ac86588b834eb9e630ec44b3
# Parent 3aa5c45874c60560d75df74adbc964e107c8538a
Defined the REQUEST_URI environment variable on Microsoft IIS
web servers, which do not have it defined by default.
diff -r 3aa5c45874c6 -r ab23db297232 mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py Sat Oct 20 03:04:34 2007 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py Wed Oct 31 10:34:08 2007 -0400
@@ -87,6 +87,11 @@ class hgwebdir(object):
def config(section, name, default=None, untrusted=True):
return parentui.config(section, name, default, untrusted)
+
+ if (req.env['SERVER_SOFTWARE'].split('/')[0] == 'Microsoft-IIS'):
+ iis_scriptname = req.env['SCRIPT_NAME']
+ iis_pathinfo = req.env['PATH_INFO']
+ req.env['REQUEST_URI'] = req.env['PATH_INFO'] =
iis_pathinfo[len(iis_scriptname):]
url = req.env['REQUEST_URI'].split('?')[0]
if not url.endswith('/'):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20071031/a88f32a3/attachment.html>
More information about the Mercurial-devel
mailing list