[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPRequest.py:1.90.2.1 HTTPResponse.py:1.75.2.2 mapply.py:1.6.66.1
Chris McDonough
chrism@zope.com
Mon, 21 Jul 2003 12:38:59 -0400
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv17213/lib/python/ZPublisher
Modified Files:
Tag: Zope-2_7-branch
HTTPRequest.py HTTPResponse.py mapply.py
Log Message:
Merge changes from HEAD since the release of Zope 2.7a1 into the Zope-2_7-branch in preparation for release of Zope 2.7b1.
=== Zope/lib/python/ZPublisher/HTTPRequest.py 1.90 => 1.90.2.1 ===
--- Zope/lib/python/ZPublisher/HTTPRequest.py:1.90 Wed Apr 9 16:26:22 2003
+++ Zope/lib/python/ZPublisher/HTTPRequest.py Mon Jul 21 12:37:22 2003
@@ -1517,18 +1517,14 @@
CONVERTED=32
-# The ZOPE_TRUSTED_PROXIES environment variable contains a colon separated
-# list of front-end proxies that are trusted to supply an accurate
+# The trusted_proxies configuration setting contains a sequence
+# of front-end proxies that are trusted to supply an accurate
# X_FORWARDED_FOR header. If REMOTE_ADDR is one of the values in this list
# and it has set an X_FORWARDED_FOR header, ZPublisher copies REMOTE_ADDR
# into X_FORWARDED_BY, and the last element of the X_FORWARDED_FOR list
# into REMOTE_ADDR. X_FORWARDED_FOR is left unchanged.
-# This function parses the environment variable into a module variable
-#
-def trusted_proxies():
- proxies = os.environ.get('ZOPE_TRUSTED_PROXIES','')
- proxies = proxies.split(':')
- proxies = [p.strip() for p in proxies]
- return tuple(proxies)
-trusted_proxies = trusted_proxies()
+# The ZConfig machinery may sets this attribute on initialization
+# if any trusted-proxies are defined in the configuration file.
+
+trusted_proxies = []
=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.75.2.1 => 1.75.2.2 ===
=== Zope/lib/python/ZPublisher/mapply.py 1.6 => 1.6.66.1 ===
--- Zope/lib/python/ZPublisher/mapply.py:1.6 Wed Aug 14 18:09:40 2002
+++ Zope/lib/python/ZPublisher/mapply.py Mon Jul 21 12:37:22 2003
@@ -14,7 +14,7 @@
"""
def default_call_object(object, args, context):
- result=apply(object,args) # Type s<cr> to step into published object.
+ result=object(*args) # Type s<cr> to step into published object.
return result
def default_missing_name(name, context):
@@ -86,4 +86,4 @@
args=tuple(args)
if debug is not None: return debug(object,args,context)
- else: return apply(object,args)
+ else: return object(*args)