Code

cvsserver: Avoid miscounting bytes in Perl v5.8.x
authorMartin Langhoff <martin@catalyst.net.nz>
Thu, 7 Dec 2006 03:38:50 +0000 (16:38 +1300)
committerJunio C Hamano <junkio@cox.net>
Thu, 7 Dec 2006 05:47:19 +0000 (21:47 -0800)
At some point between v5.6 and 5.8 Perl started to assume its input,
output and filehandles are UTF-8. This breaks the counting of bytes
for the CVS protocol, resulting in the client expecting less data
than we actually send, and storing truncated files.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsserver.perl

index ca519b7e49a0b2cc5104f71459fe621041382f19..197014d9e6cdf3285005262a9e53804860e489c7 100755 (executable)
@@ -17,6 +17,7 @@
 
 use strict;
 use warnings;
+use bytes;
 
 use Fcntl;
 use File::Temp qw/tempdir tempfile/;