Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base64 decoder doesn't support new lines -- brakes winazurestorage.py, waz-storage #91

Closed
ariofrio opened this issue May 29, 2012 · 1 comment
Milestone

Comments

@ariofrio
Copy link

While creating an item with this SDK and reading it back works (I tried it), I cannot create an item with waz-storage or winazurestorage.py and read it from Java.

I made a small test case in this repo to demonstrate the problem using Ruby and Java. Here's the output I get:

Running test...
Sending message...
Waiting 1 second...
Exception in thread "main" java.lang.IllegalArgumentException: The String is not
a valid Base64-encoded string.
        at com.microsoft.windowsazure.services.core.storage.utils.Base64.decode(Base64.java:84)
        at com.microsoft.windowsazure.services.queue.client.CloudQueueMessage.getMessageContentAsString(CloudQueueMessage.java:179)
        at Receiver.main(Receiver.java:16)
@ariofrio
Copy link
Author

In fact, it has to do with the way other languages encode base64 strings. In Python, at least, base64 strings have new lines in them. Apparently, this SDK's base64 decoder freaks out at new lines.

According to the Wikipedia article, it's normal for base64-ed strings to have new lines in them.

@ghost ghost assigned joeg Jul 11, 2012
@gcheng gcheng closed this as completed Jun 25, 2014
g2vinay pushed a commit to g2vinay/azure-sdk-for-java that referenced this issue Mar 4, 2019
Updating breaking changes for 6.0.0 release
navalev pushed a commit to navalev/azure-sdk-for-java that referenced this issue Dec 24, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants