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

wasm: use Array when converting bytes into JsValue #1341

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

skystar-p
Copy link
Contributor

In wasm environment, just using Uint8Array to convert &[u8] to JsValue gives wrong result. See:

POST / HTTP/1.1
<snip>
-----------------------------39735077602244728713763853857
Content-Disposition: form-data; name="salt"; filename="blob"
Content-Type: application/octet-stream

253215189732323814792583246113167154161341161821110310981725410248203142105158205
-----------------------------39735077602244728713763853857
Content-Disposition: form-data; name="filename"; filename="blob"
Content-Type: application/octet-stream

14792118571925534386625416214323810571220106184438911212196164
-----------------------------39735077602244728713763853857--

application/octet-stream body is printing weird string, not the binary stream (tested on current master).
This patch will fix above issue.

Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants