From d5f061e9e7401c2f88483a7bbc48344a412fef3b Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Sun, 1 Oct 2017 20:43:16 +0200 Subject: [PATCH] Apache 2.4.27 breaks ExtraHD-GUI Opening 'extrahd.cgi' led to: "Response header name 'scanhd idescanhd partitionsCache-control' contains invalid characters, aborting request". https://forum.ipfire.org/viewtopic.php?f=27&t=19550#p111030 https://forum.ipfire.org/viewtopic.php?f=50&t=19563&sid=575337ac1caf1df492fced01ca6243de#p111048 https://forum.ipfire.org/viewtopic.php?f=22&t=19563#p111052 Signed-off-by: Matthias Fischer Signed-off-by: Michael Tremer --- config/extrahd/extrahd.pl | 2 +- html/cgi-bin/extrahd.cgi | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config/extrahd/extrahd.pl b/config/extrahd/extrahd.pl index 6593ca47de..3c6fa02805 100644 --- a/config/extrahd/extrahd.pl +++ b/config/extrahd/extrahd.pl @@ -77,7 +77,7 @@ if ( "$ARGV[0]" eq "mount" ) { if ( ! `/bin/mount | /bin/fgrep $ARGV[1]` ) { system("/bin/cp -f /etc/fstab $fstab"); system("/bin/fgrep -v $ARGV[1] <$fstab >/etc/fstab"); - print "Succesfully umounted $ARGV[1].\n"; + print "Successfully umounted $ARGV[1].\n"; exit(0); } else { print "Can't umount $ARGV[1].\n"; diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi index 5a6fbce831..da1efb2ddf 100644 --- a/html/cgi-bin/extrahd.cgi +++ b/html/cgi-bin/extrahd.cgi @@ -48,8 +48,13 @@ my $partitionentry = ""; my $devicefile = "/var/ipfire/extrahd/devices"; my $scanfile = "/var/ipfire/extrahd/scan"; my $partitionsfile = "/var/ipfire/extrahd/partitions"; -system("/usr/local/bin/extrahdctrl scanhd ide"); -system("/usr/local/bin/extrahdctrl scanhd partitions"); + +#workaround to suppress a warning when a variable is used only once +my @dummy = ( ${Header::colourgreen}, ${Header::colourred} ); +undef (@dummy); + +system("/usr/local/bin/extrahdctrl scanhd ide >/dev/null"); +system("/usr/local/bin/extrahdctrl scanhd partitions >/dev/null"); &Header::showhttpheaders(); -- 2.39.2