{"thread":{"id":"43748","subject":"[PATCH] cvsserver: Avoid miscounting bytes in Perl v5.8.x","startedAt":"2006-12-07T03:38:50Z","lastAt":"2006-12-07T05:48:07Z","messageCount":2,"participants":["Martin Langhoff","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"297734","messageId":"11654627303222-git-send-email-martin@catalyst.net.nz","threadId":"43748","inReplyTo":null,"subject":"[PATCH] cvsserver: Avoid miscounting bytes in Perl v5.8.x","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2006-12-07T03:38:50Z","receivedAt":"2006-12-07T03:38:50Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"At some point between v5.6 and 5.8 Perl started to assume its input,\noutput and filehandles are UTF-8. This breaks the counting of bytes\nfor the CVS protocol, resulting in the client expecting less data\nthan we actually send, and storing truncated files.\n\nSigned-off-by: Martin Langhoff <martin@catalyst.net.nz>\n---\n\nThis has gone unfixed for quite a while. I thought I had seen\na patch posted addressing it, but it may have been for something else.\n\nIn fact, our heavily patched gitweb.cgi has needed a similar patch\nas well. Snapshot downloads were getting corrupted until we added\nuse bytes; there too. I'm not sure how current gitweb does it though...\n\n---\n git-cvsserver.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex ca519b7..197014d 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -17,6 +17,7 @@\n \n use strict;\n use warnings;\n+use bytes;\n \n use Fcntl;\n use File::Temp qw/tempdir tempfile/;\n-- \n1.4.4.1.g7923a\n"},{"id":"297979","messageId":"7v1wncw92g.fsf@assigned-by-dhcp.cox.net","threadId":"43748","inReplyTo":"11654627303222-git-send-email-martin@catalyst.net.nz","subject":"Re: [PATCH] cvsserver: Avoid miscounting bytes in Perl v5.8.x","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-07T05:48:07Z","receivedAt":"2006-12-07T05:48:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Langhoff <martin@catalyst.net.nz> writes:\n\n> At some point between v5.6 and 5.8 Perl started to assume its input,\n> output and filehandles are UTF-8. This breaks the counting of bytes\n> for the CVS protocol, resulting in the client expecting less data\n> than we actually send, and storing truncated files.\n\nThanks.  Will queue for both maint and master.\n"}]}