mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
Merge #2277
2277: fix(http): fix panic when sending document update without content type header r=MarinPostma a=MarinPostma I found a panic when pushing documents without a content-type. This fixes is by returning unknown instead of crashing. Co-authored-by: ad hoc <postma.marin@protonmail.com>
This commit is contained in:
commit
7f7958f815
@ -535,7 +535,7 @@ impl DocumentsAggregator {
|
||||
.headers()
|
||||
.get(CONTENT_TYPE)
|
||||
.map(|s| s.to_str().unwrap_or("unkown"))
|
||||
.unwrap()
|
||||
.unwrap_or("unkown")
|
||||
.to_string();
|
||||
ret.content_types.insert(content_type);
|
||||
ret.index_creation = index_creation;
|
||||
|
Loading…
Reference in New Issue
Block a user