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
This callback unconditionally invokes String::from_utf8_lossy on the response body before passing it to the decoder. This behavior impacts any binary data produced by the "http_client" source, which is relevant for the "native" and "bytes" codecs.
Configuration
sources.native_messages]
type = "http_client"
endpoint = "http://127.0.0.1:8080/native"
decoding.codec = "native"
[sinks.print]
type = "console"
inputs = ["native_messages"]
encoding.codec = "json"
A note for the community
Problem
I think, I found a bug in the
http_client
source implementation.Consider the following pipeline:
Expectation
Data in Vector-native binary format from
http://127.0.0.1:8080/native
will be re-encoded to json and printed to the stdoutReality
This error isn't triggered when I'm using other source types (everything works as expected with "stdin" source and
decoding.codec = "native"
).I managed to trace down this error. I think the root cause of this error is
on_response
callback in thehttp_client::HttpClientContext
:vector/src/sources/http_client/client.rs
Lines 328 to 338 in be9e2c4
This callback unconditionally invokes
String::from_utf8_lossy
on the response body before passing it to the decoder. This behavior impacts any binary data produced by the "http_client" source, which is relevant for the "native" and "bytes" codecs.Configuration
Version
vector 0.28.1 (x86_64-unknown-linux-gnu ff15924 2023-03-06)
Debug Output
No response
Example Data
No response
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: