all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox] http: use request method from provided param instead of unconditional POST
@ 2025-08-04  8:06 ` Lukas Wagner
  0 siblings, 0 replies; 6+ messages in thread
From: Lukas Wagner @ 2025-08-04  8:06 UTC (permalink / raw)
  To: pve-devel, pbs-devel

This fixes the "bad uri: POST is missing scheme" error that appeared
when using the webhook notification targets.

Fixes: a0dc071ee14 ("http: update to ureq3")
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 proxmox-http/src/client/sync.rs | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/proxmox-http/src/client/sync.rs b/proxmox-http/src/client/sync.rs
index b809ee38..fe87a0cf 100644
--- a/proxmox-http/src/client/sync.rs
+++ b/proxmox-http/src/client/sync.rs
@@ -127,7 +127,9 @@ impl HttpClient<String, String> for Client {
         let (parts, body) = request.into_parts();
 
         let agent = self.agent()?;
-        let mut req = http::Request::post(parts.method.as_str());
+        let mut req = http::Request::builder()
+            .method(parts.method.as_str())
+            .uri(parts.uri);
 
         for header in parts.headers.keys() {
             for value in parts.headers.get_all(header) {
@@ -182,7 +184,9 @@ impl HttpClient<&[u8], Vec<u8>> for Client {
         let (parts, body) = request.into_parts();
 
         let agent = self.agent()?;
-        let mut req = http::Request::post(parts.method.as_str());
+        let mut req = http::Request::builder()
+            .method(parts.method.as_str())
+            .uri(parts.uri);
 
         for header in parts.headers.keys() {
             for value in parts.headers.get_all(header) {
@@ -240,7 +244,9 @@ impl HttpClient<Box<dyn Read>, Box<dyn Read>> for Client {
         let (parts, body) = request.into_parts();
 
         let agent = self.agent()?;
-        let mut req = http::Request::post(parts.method.as_str());
+        let mut req = http::Request::builder()
+            .method(parts.method.as_str())
+            .uri(parts.uri);
 
         for header in parts.headers.keys() {
             for value in parts.headers.get_all(header) {
-- 
2.47.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pve-devel] [PATCH proxmox] http: use request method from provided param instead of unconditional POST
@ 2025-08-04  8:06 ` Lukas Wagner
  0 siblings, 0 replies; 6+ messages in thread
From: Lukas Wagner @ 2025-08-04  8:06 UTC (permalink / raw)
  To: pve-devel, pbs-devel

This fixes the "bad uri: POST is missing scheme" error that appeared
when using the webhook notification targets.

Fixes: a0dc071ee14 ("http: update to ureq3")
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 proxmox-http/src/client/sync.rs | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/proxmox-http/src/client/sync.rs b/proxmox-http/src/client/sync.rs
index b809ee38..fe87a0cf 100644
--- a/proxmox-http/src/client/sync.rs
+++ b/proxmox-http/src/client/sync.rs
@@ -127,7 +127,9 @@ impl HttpClient<String, String> for Client {
         let (parts, body) = request.into_parts();
 
         let agent = self.agent()?;
-        let mut req = http::Request::post(parts.method.as_str());
+        let mut req = http::Request::builder()
+            .method(parts.method.as_str())
+            .uri(parts.uri);
 
         for header in parts.headers.keys() {
             for value in parts.headers.get_all(header) {
@@ -182,7 +184,9 @@ impl HttpClient<&[u8], Vec<u8>> for Client {
         let (parts, body) = request.into_parts();
 
         let agent = self.agent()?;
-        let mut req = http::Request::post(parts.method.as_str());
+        let mut req = http::Request::builder()
+            .method(parts.method.as_str())
+            .uri(parts.uri);
 
         for header in parts.headers.keys() {
             for value in parts.headers.get_all(header) {
@@ -240,7 +244,9 @@ impl HttpClient<Box<dyn Read>, Box<dyn Read>> for Client {
         let (parts, body) = request.into_parts();
 
         let agent = self.agent()?;
-        let mut req = http::Request::post(parts.method.as_str());
+        let mut req = http::Request::builder()
+            .method(parts.method.as_str())
+            .uri(parts.uri);
 
         for header in parts.headers.keys() {
             for value in parts.headers.get_all(header) {
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pbs-devel] [pve-devel] [PATCH proxmox] http: use request method from provided param instead of unconditional POST
  2025-08-04  8:06 ` [pve-devel] " Lukas Wagner
@ 2025-08-04  9:29   ` Lukas Wagner
  -1 siblings, 0 replies; 6+ messages in thread
From: Lukas Wagner @ 2025-08-04  9:29 UTC (permalink / raw)
  To: Proxmox VE development discussion, pbs-devel; +Cc: Wolfgang Bumiller

On Mon Aug 4, 2025 at 10:06 AM CEST, Lukas Wagner wrote:
> This fixes the "bad uri: POST is missing scheme" error that appeared
> when using the webhook notification targets.
>
> Fixes: a0dc071ee14 ("http: update to ureq3")
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>  proxmox-http/src/client/sync.rs | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/proxmox-http/src/client/sync.rs b/proxmox-http/src/client/sync.rs
> index b809ee38..fe87a0cf 100644
> --- a/proxmox-http/src/client/sync.rs
> +++ b/proxmox-http/src/client/sync.rs
> @@ -127,7 +127,9 @@ impl HttpClient<String, String> for Client {
>          let (parts, body) = request.into_parts();
>  
>          let agent = self.agent()?;
> -        let mut req = http::Request::post(parts.method.as_str());
> +        let mut req = http::Request::builder()
> +            .method(parts.method.as_str())
> +            .uri(parts.uri);
>  
>          for header in parts.headers.keys() {
>              for value in parts.headers.get_all(header) {
> @@ -182,7 +184,9 @@ impl HttpClient<&[u8], Vec<u8>> for Client {
>          let (parts, body) = request.into_parts();
>  
>          let agent = self.agent()?;
> -        let mut req = http::Request::post(parts.method.as_str());
> +        let mut req = http::Request::builder()
> +            .method(parts.method.as_str())
> +            .uri(parts.uri);
>  
>          for header in parts.headers.keys() {
>              for value in parts.headers.get_all(header) {
> @@ -240,7 +244,9 @@ impl HttpClient<Box<dyn Read>, Box<dyn Read>> for Client {
>          let (parts, body) = request.into_parts();
>  
>          let agent = self.agent()?;
> -        let mut req = http::Request::post(parts.method.as_str());
> +        let mut req = http::Request::builder()
> +            .method(parts.method.as_str())
> +            .uri(parts.uri);
>  
>          for header in parts.headers.keys() {
>              for value in parts.headers.get_all(header) {


Forgot to add to the patch notes: In addition to proxmox-backup and
libpve-rs-perl, please also bump/rebuild proxmox-mail-forward - that one is
always easy to overlook for any notification-related fixes!

Thanks!


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] [PATCH proxmox] http: use request method from provided param instead of unconditional POST
@ 2025-08-04  9:29   ` Lukas Wagner
  0 siblings, 0 replies; 6+ messages in thread
From: Lukas Wagner @ 2025-08-04  9:29 UTC (permalink / raw)
  To: Proxmox VE development discussion, pbs-devel; +Cc: Wolfgang Bumiller

On Mon Aug 4, 2025 at 10:06 AM CEST, Lukas Wagner wrote:
> This fixes the "bad uri: POST is missing scheme" error that appeared
> when using the webhook notification targets.
>
> Fixes: a0dc071ee14 ("http: update to ureq3")
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>  proxmox-http/src/client/sync.rs | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/proxmox-http/src/client/sync.rs b/proxmox-http/src/client/sync.rs
> index b809ee38..fe87a0cf 100644
> --- a/proxmox-http/src/client/sync.rs
> +++ b/proxmox-http/src/client/sync.rs
> @@ -127,7 +127,9 @@ impl HttpClient<String, String> for Client {
>          let (parts, body) = request.into_parts();
>  
>          let agent = self.agent()?;
> -        let mut req = http::Request::post(parts.method.as_str());
> +        let mut req = http::Request::builder()
> +            .method(parts.method.as_str())
> +            .uri(parts.uri);
>  
>          for header in parts.headers.keys() {
>              for value in parts.headers.get_all(header) {
> @@ -182,7 +184,9 @@ impl HttpClient<&[u8], Vec<u8>> for Client {
>          let (parts, body) = request.into_parts();
>  
>          let agent = self.agent()?;
> -        let mut req = http::Request::post(parts.method.as_str());
> +        let mut req = http::Request::builder()
> +            .method(parts.method.as_str())
> +            .uri(parts.uri);
>  
>          for header in parts.headers.keys() {
>              for value in parts.headers.get_all(header) {
> @@ -240,7 +244,9 @@ impl HttpClient<Box<dyn Read>, Box<dyn Read>> for Client {
>          let (parts, body) = request.into_parts();
>  
>          let agent = self.agent()?;
> -        let mut req = http::Request::post(parts.method.as_str());
> +        let mut req = http::Request::builder()
> +            .method(parts.method.as_str())
> +            .uri(parts.uri);
>  
>          for header in parts.headers.keys() {
>              for value in parts.headers.get_all(header) {


Forgot to add to the patch notes: In addition to proxmox-backup and
libpve-rs-perl, please also bump/rebuild proxmox-mail-forward - that one is
always easy to overlook for any notification-related fixes!

Thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pbs-devel] applied: [PATCH proxmox] http: use request method from provided param instead of unconditional POST
  2025-08-04  8:06 ` [pve-devel] " Lukas Wagner
@ 2025-08-05  7:59   ` Lukas Wagner
  -1 siblings, 0 replies; 6+ messages in thread
From: Lukas Wagner @ 2025-08-05  7:59 UTC (permalink / raw)
  To: Proxmox VE development discussion, pbs-devel

On Mon Aug 4, 2025 at 10:06 AM CEST, Lukas Wagner wrote:
> This fixes the "bad uri: POST is missing scheme" error that appeared
> when using the webhook notification targets.
>
> Fixes: a0dc071ee14 ("http: update to ureq3")
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>

For the record, this one was applied already [1].

[1] https://git.proxmox.com/?p=proxmox.git;a=commit;h=fa74d6ce5005f2aca4ad3a19d205a536330bc94b


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [pve-devel] applied: [PATCH proxmox] http: use request method from provided param instead of unconditional POST
@ 2025-08-05  7:59   ` Lukas Wagner
  0 siblings, 0 replies; 6+ messages in thread
From: Lukas Wagner @ 2025-08-05  7:59 UTC (permalink / raw)
  To: Proxmox VE development discussion, pbs-devel

On Mon Aug 4, 2025 at 10:06 AM CEST, Lukas Wagner wrote:
> This fixes the "bad uri: POST is missing scheme" error that appeared
> when using the webhook notification targets.
>
> Fixes: a0dc071ee14 ("http: update to ureq3")
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>

For the record, this one was applied already [1].

[1] https://git.proxmox.com/?p=proxmox.git;a=commit;h=fa74d6ce5005f2aca4ad3a19d205a536330bc94b


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-08-05  7:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-04  8:06 [pbs-devel] [PATCH proxmox] http: use request method from provided param instead of unconditional POST Lukas Wagner
2025-08-04  8:06 ` [pve-devel] " Lukas Wagner
2025-08-04  9:29 ` [pbs-devel] " Lukas Wagner
2025-08-04  9:29   ` Lukas Wagner
2025-08-05  7:59 ` [pbs-devel] applied: " Lukas Wagner
2025-08-05  7:59   ` [pve-devel] " Lukas Wagner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal