[Zope-Checkins] CVS: Zope2 - Client.py:1.41
Andreas Jung
andreas@dhcp165.digicool.com
Tue, 24 Apr 2001 19:00:08 -0400
Update of /cvs-repository/Zope2/lib/python/ZPublisher
In directory yetix:/work/sandboxes/Zope2/lib/python/ZPublisher
Modified Files:
Client.py
Log Message:
transformed urlregex to be regex free
Marshalling code still needs to be converted to re
by someone understanding the code :-)
--- Updated File Client.py in package Zope2 --
--- Client.py 2001/04/04 18:19:17 1.40
+++ Client.py 2001/04/24 23:00:07 1.41
@@ -142,8 +142,9 @@
if password is not None: self.password=password
if timeout is not None: self.timeout=timeout
- if urlregex.match(url) >= 0:
- host,port,rurl=urlregex.group(1,2,3)
+ mo = urlregex.match(url)
+ if mo:
+ host,port,rurl=mo.group(1,2,3)
if port: port=atoi(port[1:])
else: port=80
self.host=host
@@ -346,7 +347,7 @@
##############################################################################
# Implementation details below here
-urlregex=regex.compile('http://\([^:/]+\)\(:[0-9]+\)?\(/.+\)?', regex.casefold)
+urlregex=re.compile('http://([^:/]+)(:[0-9]+)?(/.+)?', re.I)
dashtrans=maketrans('_','-')