[Bps-public-commit] r9518 - in Net-Server-IMAP: lib/Net/Server/IMAP

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Oct 31 14:35:02 EDT 2007


Author: alexmv
Date: Wed Oct 31 14:35:00 2007
New Revision: 9518

Modified:
   Net-Server-IMAP/   (props changed)
   Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm

Log:
 r24237 at zoq-fot-pik:  chmrr | 2007-10-31 14:32:50 -0400
  * Edge cases on literal parsing


Modified: Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm
==============================================================================
--- Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm	(original)
+++ Net-Server-IMAP/lib/Net/Server/IMAP/Command.pm	Wed Oct 31 14:35:00 2007
@@ -42,11 +42,11 @@
     # Pending
     $self->connection->pending(sub {
         my $content = shift;
-        if (length $content < $self->_pending_literal) {
+        if (length $content <= $self->_pending_literal) {
             $self->_literals->[$next] .= $content;
             $self->_pending_literal( $self->_pending_literal - length $content);
         } else {
-            $self->_literals->[$next] = substr($content, 0, $self->_pending_literal, "");
+            $self->_literals->[$next] .= substr($content, 0, $self->_pending_literal, "");
             $self->connection->pending(undef);
             $self->options_str($self->options_str . $content);
             return if $self->has_literal;



More information about the Bps-public-commit mailing list