From 61569d0f31464675936ec92671c8aaa02bfe5038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 4 Apr 2022 12:06:27 +0200 Subject: [PATCH] http_protocol: remove charset=utf-8 from response content type We send bencode bytes. They should possibly not be sent as text at all --- aquatic_http_protocol/src/response.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aquatic_http_protocol/src/response.rs b/aquatic_http_protocol/src/response.rs index 49ea2cf..d11c448 100644 --- a/aquatic_http_protocol/src/response.rs +++ b/aquatic_http_protocol/src/response.rs @@ -125,7 +125,7 @@ impl axum::response::IntoResponse for AnnounceResponse { self.write(&mut response_bytes).unwrap(); ( - [("Content-type", "text/plain; charset=utf-8")], + [("Content-type", "text/plain")], response_bytes, ) .into_response() @@ -170,7 +170,7 @@ impl axum::response::IntoResponse for ScrapeResponse { self.write(&mut response_bytes).unwrap(); ( - [("Content-type", "text/plain; charset=utf-8")], + [("Content-type", "text/plain")], response_bytes, ) .into_response() @@ -213,7 +213,7 @@ impl axum::response::IntoResponse for FailureResponse { self.write(&mut response_bytes).unwrap(); ( - [("Content-type", "text/plain; charset=utf-8")], + [("Content-type", "text/plain")], response_bytes, ) .into_response()