From: Martin Langhoff <martin@catalyst.net.nz>
To: git@vger.kernel.org, junkio@cox.net
Cc: Martin Langhoff <martin@catalyst.net.nz>
Subject: [PATCH] cvsserver: Avoid miscounting bytes in Perl v5.8.x
Date: Thu, 7 Dec 2006 16:38:50 +1300 [thread overview]
Message-ID: <11654627303222-git-send-email-martin@catalyst.net.nz> (raw)
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>
---
This has gone unfixed for quite a while. I thought I had seen
a patch posted addressing it, but it may have been for something else.
In fact, our heavily patched gitweb.cgi has needed a similar patch
as well. Snapshot downloads were getting corrupted until we added
use bytes; there too. I'm not sure how current gitweb does it though...
---
git-cvsserver.perl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index ca519b7..197014d 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -17,6 +17,7 @@
use strict;
use warnings;
+use bytes;
use Fcntl;
use File::Temp qw/tempdir tempfile/;
--
1.4.4.1.g7923a
next reply other threads:[~2006-12-07 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 3:38 Martin Langhoff [this message]
2006-12-07 5:48 ` [PATCH] cvsserver: Avoid miscounting bytes in Perl v5.8.x Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11654627303222-git-send-email-martin@catalyst.net.nz \
--to=martin@catalyst.net.nz \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).