Search the web
Sign In
New User? Sign Up
xml-rpc · XML-RPC Discussion
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Which base64 spec?   Message List  
Reply | Forward Message #6651 of 6839 |
Re: [xml-rpc] Which base64 spec?

Well, there are in fact a lot of quirks in the spec. In the past it
stated that string data had to be ASCII and could be used to encode
binary stuff, and this led to an infinity of discussion. Date format and
the possibility to omit some stuff have also been discussed at length.

The fact is, the spec has been frozen - "cast in stone" in the words of
the author - since 1999, and there is absolutely 0% chance of an
official update. And any updates that are not official just lead to more
fragmentation/confusion.

As far as I know, the best approach for any implementation is: be
liberal in what you accept, strict in what you give.
This means:
- do not add newlines in outgoing base64data
- strip newlines from received base64 data if there are any

Thus, in my pov, both the libs are wrong ;)

Bye
Gaetano

> Is it correct, or at least permissible, for implementations to embed
> newlines in the wire representation of base64 data?
>
> The xmlrpc spec doesn't say. It just says "base64-encoded binary" and
> the example data is very short.
>
> >From looking at the dates of the various specs, I infer that rfc2045
> was the current defacto spec for base64 encoders, therefore, xmlrpc
> implementations should expect to see newlines in the encoded data.
>
> RFC 3548 and RFC 4648 say NOT to use newlines, but they had not been
> written yet.
>
> This came up for me because Python's xmlrpclib adds newlines every 76
> characters, as per RFC 2045, but Redstone's parser blows up on them,
> apparently expecting the data to conform to RFC 3548 or 4648.
>
> It would be really, really nice if the xmlrpc spec could be updated to
> clarify this so implementers don't have to know the entire history of
> base64 ... and so we could have an authoritive source to say whether
> Python or Redstone is wrong :)
>
> -PW
>
>




Sat Jul 14, 2007 8:58 am

gaetanogiunt...
Offline Offline
Send Email Send Email

Forward
Message #6651 of 6839 |
Expand Messages Author Sort by Date

Is it correct, or at least permissible, for implementations to embed newlines in the wire representation of base64 data? The xmlrpc spec doesn't say. It just...
slinkp23
Offline Send Email
Jul 13, 2007
10:32 pm

Well, there are in fact a lot of quirks in the spec. In the past it stated that string data had to be ASCII and could be used to encode binary stuff, and this...
Gaetano Giunta
gaetanogiunt...
Offline Send Email
Jul 14, 2007
8:59 am

We frequently get into the "what is the nature of a standard" discussion here. I don't think most people really care whether an XML-RPC implementation is...
bryanh@...
giraffedata
Offline Send Email
Jul 14, 2007
6:44 pm

... Well, it apparently melted slightly in 2003 ;-) I don't see how a couple of words to clarify that nearly everyone is already doing base64 correctly would...
slinkp23
Offline Send Email
Jul 16, 2007
3:25 pm

... I have just looked at the Redstone Bas64 decoder and it's obviously broken. The code correctly ignores whitespace characters but then complains that the...
John Wilson
tug123uk
Offline Send Email
Jul 14, 2007
12:25 pm

... Thanks John, I have filed a bug report at https://sourceforge.net/tracker/?func=detail&atid=383547&aid=1753822&group_id=25164...
slinkp23
Offline Send Email
Jul 16, 2007
3:10 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help