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.master
parent
ffaddb22b8
commit
4c3cd29224
|
@ -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 New Issue