]> git.ozlabs.org Git - ppp.git/commitdiff
scripts/lcp_rtt_exporter: include content length in response (#467)
authorTomasz Torcz <tomek@pipebreaker.pl>
Thu, 21 Dec 2023 19:51:57 +0000 (20:51 +0100)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 19:51:57 +0000 (19:51 +0000)
Signed-off-by: Tomasz Torcz <tomek@pipebreaker.pl>
scripts/lcp_rtt_exporter

index 6fab745f2bffb0fc0483b34c4000097fbf08dbeb..4b57d2a9e4321b2893313ec9106a85486b8466c0 100644 (file)
@@ -21,8 +21,10 @@ use List::Util qw(sum max min);
        my $stats = compute_statistics($data, 60);
 
        my $s = metrics($stats);
+       my $length = length($s);
 
-       print "Content-type: text/plain\n\n$s";
+       print "Content-type: text/plain\n";
+       print "Content-length: $length\n\n$s";
        exit;
 }