Skip to content

Commit 59e2cbf

Browse files
authored
fix(http_client source): remove utf8 lossy conversion (vectordotdev#17655)
Fixes: vectordotdev#16814 This change is a now a no-op thanks to vectordotdev#17628 and vectordotdev#17688.
1 parent 41ee394 commit 59e2cbf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/sources/http_client/client.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ impl http_client::HttpClientContext for HttpClientContext {
309309
fn on_response(&mut self, _url: &Uri, _header: &Parts, body: &Bytes) -> Option<Vec<Event>> {
310310
// get the body into a byte array
311311
let mut buf = BytesMut::new();
312-
let body = String::from_utf8_lossy(body);
313-
buf.extend_from_slice(body.as_bytes());
312+
buf.extend_from_slice(body);
314313

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

0 commit comments

Comments
 (0)