diff --git a/proxmox-notify/src/endpoints/webhook.rs b/proxmox-notify/src/endpoints/webhook.rs index 604777c7..eada590e 100644 --- a/proxmox-notify/src/endpoints/webhook.rs +++ b/proxmox-notify/src/endpoints/webhook.rs @@ -359,7 +359,7 @@ impl WebhookEndpoint { // // -> send the header always, unless we do a get with no body (which is the expected case // for GET) - let content_length = body.as_bytes().len(); + let content_length = body.len(); if !(self.config.method == HttpMethod::Get && content_length == 0) { builder = builder.header(http::header::CONTENT_LENGTH, content_length); } diff --git a/proxmox-notify/src/renderer/mod.rs b/proxmox-notify/src/renderer/mod.rs index b37cf438..bff76ed1 100644 --- a/proxmox-notify/src/renderer/mod.rs +++ b/proxmox-notify/src/renderer/mod.rs @@ -285,7 +285,7 @@ fn render_template_impl( filename: &str, source: TemplateSource, ) -> Result, Error> { - let template_string = context::context().lookup_template(&filename, None, source)?; + let template_string = context::context().lookup_template(filename, None, source)?; if let Some(template_string) = template_string { let mut handlebars = Handlebars::new();