From 652af1577159986af71bc1c644b72f3457f20e20 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 13 Apr 2024 05:36:29 +0200 Subject: [PATCH] fix: include method in request target --- src/server/auth.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/auth.rs b/src/server/auth.rs index 7725fe36..61291809 100644 --- a/src/server/auth.rs +++ b/src/server/auth.rs @@ -133,7 +133,11 @@ impl HttpSignature { for header in self.headers.iter() { match header.as_str() { "(request-target)" => out.push( - format!("(request-target): {}", parts.uri.path_and_query().map(|x| x.as_str()).unwrap_or("/")) + format!( + "(request-target): {} {}", + parts.method.to_string().to_lowercase(), + parts.uri.path_and_query().map(|x| x.as_str()).unwrap_or("/") + ) ), // TODO other pseudo-headers, _ => out.push(format!("{}: {}",