[Rt-commit] r17407 - in rt/3.8/trunk: lib/RT/Interface/Web/Mason
sartak at bestpractical.com
sartak at bestpractical.com
Mon Dec 29 16:01:23 EST 2008
Author: sartak
Date: Mon Dec 29 16:01:23 2008
New Revision: 17407
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/lib/RT/Interface/Web/Mason/CGIHandler.pm
Log:
r77993 at onn: sartak | 2008-12-29 16:01:11 -0500
Explain what this "local $/ = \16384" does
Modified: rt/3.8/trunk/lib/RT/Interface/Web/Mason/CGIHandler.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Interface/Web/Mason/CGIHandler.pm (original)
+++ rt/3.8/trunk/lib/RT/Interface/Web/Mason/CGIHandler.pm Mon Dec 29 16:01:23 2008
@@ -16,6 +16,9 @@
-Content_length => (-s $file) );
open my $fh, "<$file" or die "Can't open $file: $!";
binmode($fh);
+
+ # Read 16384 byte chunks instead of splitting on newlines (so it works
+ # better for binary files)
local $/ = \16384;
print $_ while <$fh>;
close $fh;
More information about the Rt-commit
mailing list