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
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
I was trying to send a CBOR serialized object through the pubsub API and found that the bytes were not being round tripped intact. This is because the Buffer passes through a querystring on its way to the go-ipfs instance, and the qs library being used does not handle a binary buffer safely in this function: https://github.com/ljharb/qs/blob/v6.4.0/lib/utils.js#L88
I have a patch for js-ipfs-api that uses qs.stringify's encoder option to override the encoding of Buffer objects, escaping every byte that isn't an rfc3986 unreserved character without further mutations. I'll submit it as a PR shortly in case it's the desired solution. I'm not familiar enough with this library/spec to say, but maybe the buffer should just be sent in the request body instead of in a query string parameter.
The text was updated successfully, but these errors were encountered:
vith
added a commit
to vith/js-ipfs-api
that referenced
this issue
Jun 21, 2017
I was trying to send a CBOR serialized object through the pubsub API and found that the bytes were not being round tripped intact. This is because the Buffer passes through a querystring on its way to the go-ipfs instance, and the qs library being used does not handle a binary buffer safely in this function: https://github.com/ljharb/qs/blob/v6.4.0/lib/utils.js#L88
I have a patch for js-ipfs-api that uses qs.stringify's encoder option to override the encoding of Buffer objects, escaping every byte that isn't an rfc3986 unreserved character without further mutations. I'll submit it as a PR shortly in case it's the desired solution. I'm not familiar enough with this library/spec to say, but maybe the buffer should just be sent in the request body instead of in a query string parameter.
The text was updated successfully, but these errors were encountered: