[Twisted-web] web2.client: Extraneous '\n' in Authorization: header

Scott Lamb slamb at slamb.org
Fri Sep 23 17:10:09 MDT 2005

The base64 encoding seems to introduce a newline. There was a strip  
in this line, but not in the right place to take care of this. (Does  
strip('') do anything? Is there some other reason to strip _before_  
base64 encoding?) If the answers to those questions are both "No",  
this patch fixes it.

I noticed this because I'm sending XML. The server was complaining  
about my "<?xml ...?>" preamble; apparently the '<' has to be the  
very first character of an XML document.

Scott Lamb <http://www.slamb.org/>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: auth-newline.patch
Type: application/octet-stream
Size: 490 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20050923/c7dbb782/auth-newline.obj

More information about the Twisted-web mailing list