-
Notifications
You must be signed in to change notification settings - Fork 125
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
Emoji string fails to decode #152
Labels
Comments
The problem here is that go-httpbin only accepts the URL-safe base64 encoding, though the error does not make that obvious. Fixing in #153. |
mccutchen
added a commit
that referenced
this issue
Nov 5, 2023
#153) As reported in #152, the `/base64` endpoint can only decode the "URL-safe" base64 encoding, but the error it returns is not very useful if you're not already familiar with different base64 encoding variants. Here we follow [Postel's law][1] and accept either the URL-safe or standard encodings, while continuing to use the URL-safe variant when encoding ourselves. Fixes #152. [1]: https://en.wikipedia.org/wiki/Robustness_principle
Fix released in v2.12.0, and deployed to https://httpbingo.org. Your test case now works as expected: $ curl 'https://httpbingo.org/base64/decode/8J+Ziywg8J+MjSEK4oCm'
π, π!
β¦ Thanks for the report @bbhtt! |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello any idea why this string fails to decode?
It seems to work fine on command line
echo "8J+Ziywg8J+MjSEK4oCm"|base64 --decode
but https://httpbingo.org/base64/decode/8J+Ziywg8J+MjSEK4oCm returns an error.I guess it rejects certain encodes?
The text was updated successfully, but these errors were encountered: