From edffeba60bbfba713d6eddaaa84cb4ffd0291e58 Mon Sep 17 00:00:00 2001 From: iliajie Date: Mon, 5 Jun 2023 11:57:56 +0300 Subject: [PATCH] Fix to drop any local MIME type checks https://github.com/webmin/webmin/pull/1917#discussion_r1217241079 --- XHR-lib.pl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/XHR-lib.pl b/XHR-lib.pl index d91d207b7..324f619b4 100644 --- a/XHR-lib.pl +++ b/XHR-lib.pl @@ -32,12 +32,6 @@ if ($in{'action'} eq "fetch") { &http_download($host, $port, $page, \$img, undef, undef, $ssl, undef, undef, 10, undef, undef, undef, \$response_headers); # Get MIME content type my $mime_type = $response_headers->{'content-type'}; - if ($mime_type !~/image\//) { - eval "use File::MimeInfo"; - my $img_tmp = &transname(); - &write_file_contents($img_tmp, $img); - $mime_type = mimetype($img_tmp); - } print "x-no-links: 1\n"; print "Content-type: $mime_type;\n\n"; print $img;