matrix-sdk: Don't set two content-type headers for json contents
Ruma will for some requests already set the content-type for us to application/json, but for some it still seems to miss the header, since the headers are kept in a map add the header only if it isn't already there.
This commit is contained in:
parent
ffaddb22b8
commit
4c3cd29224
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ impl HttpClient {
|
|||
if let Some(content_type) = content_type {
|
||||
request
|
||||
.headers_mut()
|
||||
.append(http::header::CONTENT_TYPE, content_type);
|
||||
.insert(http::header::CONTENT_TYPE, content_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue