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 encoding is STD for datastore transaction but google_api_bytes always uses URL_SAFE #3

Open
bes opened this issue Oct 25, 2020 · 1 comment

Comments

@bes
Copy link

bes commented Oct 25, 2020

google_api_bytes v 0.1.0 uses radix64:URL_SAFE as the standard Base64 decoder.

I am using the google-datastore1 library like so:

google-datastore1 = { git = "https://github.com/google-apis-rs/generated" }

And in this call:

let response: BeginTransactionResponse = builder.execute()?;

the transaction property of BeginTransactionResponse is actually radix64:STD.

Leading to the following error message from google_api_bytes: invalid base64 input

I'm pretty sure by changing use radix64::URL_SAFE as BASE64_CFG; to use radix64::STD as BASE64_CFG; I am breaking some of the other generated libraries though, so that is not a good solution.

If an expert could take a look at this, it would be appreciated.

Thanks.

@mwilliammyers
Copy link
Member

Hello, thanks for the report!

I'm pretty sure by changing use radix64::URL_SAFE as BASE64_CFG; to use radix64::STD as BASE64_CFG; I am breaking some of the other generated libraries though, so that is not a good solution.

You are correct 🙂

It looks like we are not sure how to handle this issue for now google-apis-rs/generator#22, although we have a less than ideal workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants