Browse Source

Send Content-Length header

Alois Mahdal 11 years ago
parent
commit
d9ff5ad2fa
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      cgi-bin/htlog/htlog.cgi

+ 4
- 1
cgi-bin/htlog/htlog.cgi View File

@@ -47,12 +47,15 @@ my $message = sprintf("Time: %s; Origin: %s; Tag: %s; I: %s; Message: %s\n",
47 47
 
48 48
 print $fh $message;
49 49
 
50
+my $out = "Message logged: $msg\n";
51
+
50 52
 print $q->header(
51 53
     -type               => 'text/plain',
52 54
     -expires            => 'now',
55
+    -content_lentgth    => length $out
53 56
 );
54 57
 
55
-print "Message logged: $msg\n";
58
+print $out;
56 59
 
57 60
 close $fh or die "cannot close log file: $!";
58 61