mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02: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
1 changed files with 1 additions and 1 deletions
|
@ -535,7 +535,7 @@ impl DocumentsAggregator {
|
||||||
.headers()
|
.headers()
|
||||||
.get(CONTENT_TYPE)
|
.get(CONTENT_TYPE)
|
||||||
.map(|s| s.to_str().unwrap_or("unkown"))
|
.map(|s| s.to_str().unwrap_or("unkown"))
|
||||||
.unwrap()
|
.unwrap_or("unkown")
|
||||||
.to_string();
|
.to_string();
|
||||||
ret.content_types.insert(content_type);
|
ret.content_types.insert(content_type);
|
||||||
ret.index_creation = index_creation;
|
ret.index_creation = index_creation;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue