Replace mime type "application/ron" by "text/ron" and put it in the common crate

This commit is contained in:
Greg Burri 2025-05-09 23:45:32 +02:00
parent f9899c1aeb
commit 1c2e910dea
7 changed files with 96 additions and 129 deletions

View file

@ -31,7 +31,7 @@ pub async fn ron_error_to_html(
let response = next.run(req).await;
if let Some(content_type) = response.headers().get(header::CONTENT_TYPE) {
if content_type == ron_utils::RON_CONTENT_TYPE {
if content_type == common::consts::MIME_TYPE_RON {
let message = match body::to_bytes(response.into_body(), usize::MAX).await {
Ok(bytes) => String::from_utf8(bytes.to_vec()).unwrap_or_default(),
Err(error) => error.to_string(),