[Zope-CVS] CVS: Packages/FunctionalTests/FunctionalTests -
Request.py:1.7.2.6
Karl Anderson
cvs-admin at zope.org
Fri Nov 14 21:10:53 EST 2003
Update of /cvs-repository/Packages/FunctionalTests/FunctionalTests
In directory cvs.zope.org:/tmp/cvs-serv7115
Modified Files:
Tag: kra-misc-branch
Request.py
Log Message:
HTTPRequest.__call__(): bugfix: strip extra newline from Authorization
header if placed there by encodestring()
=== Packages/FunctionalTests/FunctionalTests/Request.py 1.7.2.5 => 1.7.2.6 ===
--- Packages/FunctionalTests/FunctionalTests/Request.py:1.7.2.5 Fri Nov 14 19:52:00 2003
+++ Packages/FunctionalTests/FunctionalTests/Request.py Fri Nov 14 21:10:53 2003
@@ -470,6 +470,7 @@
try:
connection = httplib.HTTP( host, conport )
connection.putrequest( self.getMethod(), self.getURI() )
+
if port:
connection.putheader( 'Host', '%s:%d' % ( host, port ) )
else:
@@ -482,6 +483,8 @@
token = self.getAuthenticationToken()
if token:
scrambled = base64.encodestring( token )
+ if scrambled[-1] == '\n':
+ scrambled = scrambled[:-1]
connection.putheader( 'Authorization', 'Basic %s' % scrambled )
for key, value in self.getHeaders():
More information about the Zope-CVS
mailing list