From e81fe829f9c12730ee10fb99e54c11878196dd52 Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Wed, 15 Nov 2023 11:20:40 +0100 Subject: [PATCH] fix: Fix compressed content support in Proxy plugin --- Changes | 1 + lib/GLPI/Agent/HTTP/Server/Proxy.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index f36a97b95..0f0c29ea9 100644 --- a/Changes +++ b/Changes @@ -68,6 +68,7 @@ esx: proxy-server-plugin: * fix #461: Fix XML content-type support for inventories sent by android agent * Store json inventories with right name where locally storing inventories +* Fixed compressed content support injector: * Support --ssl-cert-file option to permit SSL client authentication diff --git a/lib/GLPI/Agent/HTTP/Server/Proxy.pm b/lib/GLPI/Agent/HTTP/Server/Proxy.pm index 738763b2e..fba37e9cb 100644 --- a/lib/GLPI/Agent/HTTP/Server/Proxy.pm +++ b/lib/GLPI/Agent/HTTP/Server/Proxy.pm @@ -363,7 +363,7 @@ sub _handle_proxy_request { } # Fix content-type if it has been uncompressed - if ($content_type =~ m|^application/x-compress|) { + if ($content_type =~ m|^application/x-compress|i) { $content_type = "application/json" if $content =~ /^{/; $content_type = "application/xml" if $content =~ /^<\?xml/; }