You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./llrt test/buffer.test.js
Error: Base64Error
at <anonymous> (/.../packages/lambda/test/buffer.test.js:3:23)
If I replace the _ in str with / then it decodes the base64 string successfully in both Node and LLRT.
Node decodes both standard and URL safe base64 encoded strings, but LLRT only supports the standard charset at the moment as it uses the forgiving_decode_to_vec function here which only supports the standard charset.
The text was updated successfully, but these errors were encountered:
Could LLRT first check which charset is being decoded by looking for the +/ or -_ characters, and then decode the string using the corresponding charset? That doesn't solve the problem of forgiving_decode_to_vec only supporting the standard charset though :/
Or I guess simply replacing instances of -_ with +/ before using forgiving_decode_to_vec might be sufficient?
When executing the following:
With Node I get:
With LLRT I get:
If I replace the
_
instr
with/
then it decodes the base64 string successfully in both Node and LLRT.Node decodes both standard and URL safe base64 encoded strings, but LLRT only supports the standard charset at the moment as it uses the
forgiving_decode_to_vec
function here which only supports the standard charset.The text was updated successfully, but these errors were encountered: