http_protocol: remove charset=utf-8 from response content type

We send bencode bytes. They should possibly not be sent as text at all
This commit is contained in:
Joakim Frostegård 2022-04-04 12:06:27 +02:00
parent 5da1c304a3
commit 61569d0f31

View file

@ -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()