Skip to content

Pubsub subscription data encoding #7939

@achingbrain

Description

@achingbrain

Version information:

go-ipfs version: 0.8.0
Repo version: 11
System version: amd64/darwin
Golang version: go1.15.8

Description:

The HTTP API has a few endpoints that return newline-delimited JSON which is used to stream responses to the client.

One such API is pubsub/sub. The problem here is that the data is sent as an ascii-encoded string with no escaping so can include the newline character code which ipfs-http-client then interprets (not unreasonably) as ending the current line.

The object API accepts a data-encoding argument that lets you encode binary data in a form of the users' choosing. The pubsub API (and anything that outputs binary data) should accept a data-encoding argument.

Refs: ipfs/js-ipfs#3567

Metadata

Metadata

Labels

P1High: Likely tackled by core team if no one steps upkind/bugA bug in existing code (including security flaws)status/readyReady to be workedtopic/apiTopic apitopic/rpc-apiIssues related to Kubo RPC API at /api/v0

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions