api3/admin/datastore/upload_catar.rs: verify content type ("application/x-proxmox-backup-catar")
This commit is contained in:
@ -17,7 +17,7 @@ impl HttpClient {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn upload(&self, body: Body, path: &str) -> Result<(), Error> {
|
||||
pub fn upload(&self, content_type: &str, body: Body, path: &str) -> Result<(), Error> {
|
||||
|
||||
let client = Client::new();
|
||||
|
||||
@ -30,6 +30,7 @@ impl HttpClient {
|
||||
.method("POST")
|
||||
.uri(url)
|
||||
.header("User-Agent", "proxmox-backup-client/1.0")
|
||||
.header("Content-Type", content_type)
|
||||
.body(body)?;
|
||||
|
||||
let future = client
|
||||
|
Reference in New Issue
Block a user