Bugs item #1753732, was opened at 2007-07-13 20:36
Message generated for change (Comment added) made by loewis
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 :)


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

>Comment By: Martin v. Löwis (loewis)
Date: 2007-07-14 14:51

Message:
Logged In: YES 
user_id=21627
Originator: NO

Note that RFC 3548 is informational, so it is not a specification (at
least not of an internet protocol).

Also notice that Python's xmlrpclib library is not the specification or
de-facto implementation of XML-RPC, either. The official XML-RPC
specification is at

http://www.xmlrpc.com/spec

According to that specification, the only possibilities are that Python's
implementation is either conforming or not conforming. If it is not
conforming, it should be changed; if it is conforming, it should stay, and
Redstone should be changed.

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

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