Bugs item #1753732, was opened at 2007-07-13 14:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1753732&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paul Winkler (slinkp)
Assigned to: Nobody/Anonymous (nobody)
Summary: xmlrpclib.Binary doesn't say which base64 spec it implements

Initial Comment:
xmlrpclib.Binary.encode() does base64 encoding.
But there are actually two conflicting specs: RFC 2045 says add newlines every 
76 characters, RFC 3548 says do NOT add newlines.

The xmlrpc spec characteristically doesn't mention an RFC, so it's not clear 
which spec they mean by "base64".
By looking at the dates on the various specs, it can be inferred that they must 
mean MIME-style with newlines, as per RFC 2045.  That's xmlrpclib does.

But for those of us implementing stuff in the trenches and struggling with 
interoperability issues, it would be nice if the python docs were more 
informative so we don't have to go spiraling off into reading multiple specs 
and figuring out which came first :)

So I'd suggest changing the Binary.encode docstring to something like:

"""Write the XML-RPC base 64 encoding of this binary item to the out stream 
object.

Note that the encoded data will have newlines every 76 characters as per RFC 
2045, which was the de facto standard base64 specification when the xmlrpc spec 
was written."""

Arguably, the behavior could be changed instead - due to the xmlrpc spec's 
silence on the subject, not all clients may tolerate newlines (Redstone 
doesn't)... but that's a separate argument :)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1753732&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to