[pve-devel] [PATCH installer] auto-installer: fix answer-request charset

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Apr 26 10:12:55 CEST 2024


'utf-' is a typo, and can trip up some servers that do strict
checking/matching.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    see https://forum.proxmox.com/threads/invalid-charset-on-automated-install-answer-http-fetch.145856/

 proxmox-fetch-answer/src/fetch_plugins/http.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-fetch-answer/src/fetch_plugins/http.rs b/proxmox-fetch-answer/src/fetch_plugins/http.rs
index 1c5e9ea..21bc6a2 100644
--- a/proxmox-fetch-answer/src/fetch_plugins/http.rs
+++ b/proxmox-fetch-answer/src/fetch_plugins/http.rs
@@ -211,7 +211,7 @@ mod http_post {
 
             answer = agent
                 .post(&url)
-                .set("Content-type", "application/json; charset=utf-")
+                .set("Content-type", "application/json; charset=utf-8")
                 .send_string(&payload)?
                 .into_string()?;
         } else {
@@ -231,7 +231,7 @@ mod http_post {
                 .build();
             answer = agent
                 .post(&url)
-                .set("Content-type", "application/json; charset=utf-")
+                .set("Content-type", "application/json; charset=utf-8")
                 .timeout(std::time::Duration::from_secs(60))
                 .send_string(&payload)?
                 .into_string()?;
-- 
2.39.2





More information about the pve-devel mailing list