[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/HTTP - HTTPRequest.py:1.1.2.13 HTTPResponse.py:1.1.2.9
Shane Hathaway
shane@digicool.com
Fri, 30 Nov 2001 10:27:27 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/HTTP
In directory cvs.zope.org:/tmp/cvs-serv29399/lib/python/Zope/Publisher/HTTP
Modified Files:
Tag: Zope-3x-branch
HTTPRequest.py HTTPResponse.py
Log Message:
- Added tests of HTTP pipelining and fixed bugs.
- Added tests of publisher retry mechanisms and fixed bugs.
- Rearranged http_task for clarity.
- Moved knowledge of PATH_INFO into BaseRequest only.
- Removed commented code.
- Corrected publisher Retry handling.
All this while riding the VRE. Gotta love trains! ;-)
=== Zope3/lib/python/Zope/Publisher/HTTP/HTTPRequest.py 1.1.2.12 => 1.1.2.13 ===
DEFAULT_PORTS = {'http': '80', 'https': '443'}
+STAGGER_RETRIES = 1
URLmatch=re.compile('URL(PATH)?([0-9]+)$').match
BASEmatch=re.compile('BASE(PATH)?([0-9]+)$').match
@@ -87,8 +88,8 @@
def supports_retry(self):
if self.retry_count < self.retry_max_count:
- # Stagger retries
- time.sleep(whrandom.uniform(0, 2**(self.retry_count)))
+ if STAGGER_RETRIES:
+ time.sleep(whrandom.uniform(0, 2**(self.retry_count)))
return 1
def retry(self):
=== Zope3/lib/python/Zope/Publisher/HTTP/HTTPResponse.py 1.1.2.8 => 1.1.2.9 ===
for name in map(string.lower, en):
status_codes[name]=500
-status_codes['nameerror']=503
-status_codes['keyerror']=503
-status_codes['redirect']=300
accumulate_header={'set-cookie': 1}.has_key