Skip to content

Extra newline at end of "dag get" result #3503

@ianopolous

Description

@ianopolous

Version information:

go-ipfs version: 0.4.5-dev-4cb236c
Repo version: 4
System version: amd64/linux
Golang version: go1.7.1

Type:

Bug

Priority:

P1 (for me)

Description:

Using either the cli or http api the dag get command seems to add an extra newline 0x0A on the end of the raw data.

To reproduce using cli:

echo '{"data":1234}' | ipfs dag put -f cbor

then

ipfs dag get zdpuAs3whHmb9T1NkHSLGF45ykcKrEBxSLiEx6YpLzmKbQLEB | wc -c

should give 13, but gives 14, and the extra byte on the end is a newline

The same JSON through the http api results in the same extra byte. The JSON is not special, similar JSON with more/different elements does the same.

Metadata

Metadata

Assignees

Labels

P1High: Likely tackled by core team if no one steps upkind/bugA bug in existing code (including security flaws)status/readyReady to be worked

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions