influxdata / influxdata/line-protocol

protocol: non-space whitespace does not round trip correctly via Encode/StreamParser

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
37
Forks
10
PR merge metrics
No merged PRs in 30d

Description

There are special cases in the code to escape tab, newline, carriage-return and form-feed when encoding line-protocol values.
It seems that those cases aren't respected correctly when decoding.

For example, [this code](https://play.golang.org/p/Z0t8bVOoHLs) fails because it can't parse the line that has been encoded.

[This code](https://play.golang.org/p/YpHiH0Ne7Vj) fails because the value has been silently changed when round tripping.

I appreciate that the encoding conventions probably can't change, but perhaps we could consider returning an error when the encoded values include these characters, to avoid this potential trip hazard.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.