From 4bd1de9fddf7b02e76184e8af3fe808037040285 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 13 Apr 2016 00:54:57 +0200 Subject: Bug 398546 - config.cgi using the RDF format can generate a pretty large file r=dkl --- config.cgi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config.cgi') diff --git a/config.cgi b/config.cgi index 8e423ca00..3e3943989 100755 --- a/config.cgi +++ b/config.cgi @@ -139,6 +139,9 @@ sub display_data { $template->process($format->{'template'}, $vars, \$output) || ThrowTemplateError($template->error()); + # Remove leading whitespaces, to save some bandwidth. + $output =~ s/^\s+(?=<)//gm if $format->{'ctype'} =~ /rdf/; + # Wide characters cause md5_base64() to die. my $digest_data = $output; utf8::encode($digest_data) if utf8::is_utf8($digest_data); -- cgit v1.2.3-24-g4f1b