mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I thought it might be a good idea to clean these up. Doing so, some missing or inconsistent licence headers were fixed. There is no need in shipping all these files en bloc, as their functionality won't change. Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
@@ -52,8 +52,8 @@ my $range = lc $query{'range'}; # lower case
|
||||
unless(($origin =~ /^\w+?\.cgi$/) && ($graph =~ /^[\w\-.,; ]+?$/) && ($range ~~ @Graphs::time_ranges)) {
|
||||
# Send HTTP headers
|
||||
_start_svg_output();
|
||||
|
||||
_print_error("URL parameters missing or malformed.");
|
||||
|
||||
_print_error("URL parameters missing or malformed.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -62,13 +62,13 @@ unless(($origin =~ /^\w+?\.cgi$/) && ($graph =~ /^[\w\-.,; ]+?$/) && ($range ~~
|
||||
unless(($origin ~~ @supported_origins) || ($origin eq "getrrdimage.cgi")) {
|
||||
# Rewrite to old URL format: /[graph origin cgi]?[graph name]?[time range]
|
||||
my $location = "https://$ENV{'SERVER_NAME'}:$ENV{'SERVER_PORT'}/cgi-bin/${origin}?${graph}?${range}";
|
||||
|
||||
|
||||
# Send HTTP redirect
|
||||
print "Status: 302 Found\n";
|
||||
print "Location: $location\n";
|
||||
print "Content-type: text/html; charset=UTF-8\n";
|
||||
print "\n"; # End of HTTP headers
|
||||
|
||||
|
||||
print "Unsupported origin, request redirected to '$location'";
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user