Skip to content

Commit

Permalink
fix(http_client source): remove utf8 lossy conversion (vectordotdev#1…
Browse files Browse the repository at this point in the history
…7655)

Fixes: vectordotdev#16814

This change is a now a no-op thanks to
vectordotdev#17628 and
vectordotdev#17688.
  • Loading branch information
dsmith3197 authored Jun 14, 2023
1 parent 41ee394 commit 59e2cbf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sources/http_client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ impl http_client::HttpClientContext for HttpClientContext {
fn on_response(&mut self, _url: &Uri, _header: &Parts, body: &Bytes) -> Option<Vec<Event>> {
// get the body into a byte array
let mut buf = BytesMut::new();
let body = String::from_utf8_lossy(body);
buf.extend_from_slice(body.as_bytes());
buf.extend_from_slice(body);

let events = self.decode_events(&mut buf);

Expand Down

0 comments on commit 59e2cbf

Please sign in to comment.