From fe7640555d5675a1a0298da8cd5b9b1c8f8c70ac Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 29 Jun 2021 13:16:56 +0200 Subject: [PATCH] fix the content-type --- meilisearch-http/src/routes/document.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch-http/src/routes/document.rs b/meilisearch-http/src/routes/document.rs index eb41f7eff..5f0d1d1fa 100644 --- a/meilisearch-http/src/routes/document.rs +++ b/meilisearch-http/src/routes/document.rs @@ -37,10 +37,10 @@ fn guard_json(head: &actix_web::dev::RequestHead) -> bool { content_type .to_str() .map(|v| v.contains("application/json")) - // if no content-type is specified we still accept the data as json! - .unwrap_or(true) + .unwrap_or(false) } else { - false + // if no content-type is specified we still accept the data as json! + true } }