diff --git a/meilisearch-http/src/routes/indexes/documents.rs b/meilisearch-http/src/routes/indexes/documents.rs index e890bab24..2f6746c90 100644 --- a/meilisearch-http/src/routes/indexes/documents.rs +++ b/meilisearch-http/src/routes/indexes/documents.rs @@ -181,7 +181,7 @@ async fn document_addition( vec![ "application/json".to_string(), "application/x-ndjson".to_string(), - "application/csv".to_string(), + "text/csv".to_string(), ] }); let format = match content_type { diff --git a/meilisearch-http/tests/documents/add_documents.rs b/meilisearch-http/tests/documents/add_documents.rs index a9189a30c..15f81b5f3 100644 --- a/meilisearch-http/tests/documents/add_documents.rs +++ b/meilisearch-http/tests/documents/add_documents.rs @@ -124,7 +124,7 @@ async fn add_documents_test_bad_content_types() { assert_eq!( response["message"], json!( - r#"The Content-Type "text/plain" is invalid. Accepted values for the Content-Type header are: "application/json", "application/x-ndjson", "application/csv""# + r#"The Content-Type "text/plain" is invalid. Accepted values for the Content-Type header are: "application/json", "application/x-ndjson", "text/csv""# ) ); @@ -142,7 +142,7 @@ async fn add_documents_test_bad_content_types() { assert_eq!( response["message"], json!( - r#"The Content-Type "text/plain" is invalid. Accepted values for the Content-Type header are: "application/json", "application/x-ndjson", "application/csv""# + r#"The Content-Type "text/plain" is invalid. Accepted values for the Content-Type header are: "application/json", "application/x-ndjson", "text/csv""# ) ); }