[Checkins] SVN: zope.publisher/trunk/src/zope/publisher/http.py Sometimes HTTP_HOST does not exist, but KeyError must not occur.
Yusei Tahara
yusei at domen.cx
Sat Sep 5 02:51:05 EDT 2009
Log message for revision 103578:
Sometimes HTTP_HOST does not exist, but KeyError must not occur.
Changed:
U zope.publisher/trunk/src/zope/publisher/http.py
-=-
Modified: zope.publisher/trunk/src/zope/publisher/http.py
===================================================================
--- zope.publisher/trunk/src/zope/publisher/http.py 2009-09-05 06:35:54 UTC (rev 103577)
+++ zope.publisher/trunk/src/zope/publisher/http.py 2009-09-05 06:51:04 UTC (rev 103578)
@@ -887,7 +887,7 @@
if not trusted:
scheme, target_host, path, query, fragment = (
urlparse.urlsplit(location))
- if target_host and target_host != self._request['HTTP_HOST']:
+ if target_host and target_host != self._request.get('HTTP_HOST'):
raise ValueError(
"Untrusted redirect to host %r not allowed." % target_host)
More information about the checkins
mailing list