mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08: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()
|
.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…
Reference in New Issue
Block a user