Skip to content

Commit

Permalink
fix: Fix compressed content support in Proxy plugin
Browse files Browse the repository at this point in the history
g-bougard committed Nov 15, 2023
1 parent 1ec8997 commit e81fe82
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lib/GLPI/Agent/HTTP/Server/Proxy.pm
Original file line number Diff line number Diff line change
@@ -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/;
}

0 comments on commit e81fe82

Please sign in to comment.