# HG changeset patch # User Jeff Hammel # Date 1356927108 28800 # Node ID 3a1fb496b47db465eb3669c2e27e0c1907b8873a # Parent b1a5abacf1f3c3dfd341ea4cd1954fa5ef5f419e fix host matching if HTTP_HOST is not given diff -r b1a5abacf1f3 -r 3a1fb496b47d wsgintegrate/match.py --- a/wsgintegrate/match.py Tue Aug 28 21:53:55 2012 -0700 +++ b/wsgintegrate/match.py Sun Dec 30 20:11:48 2012 -0800 @@ -91,7 +91,9 @@ self.port = port def condition(self, environ): - host = environ['HTTP_HOST'] + host = environ.get('HTTP_HOST') + if host is None: + return False port = None if ':' in host: host, port = host.rsplit(':', 1)