[Bps-public-commit] Net-IMAP-Server branch, master, updated. 1.29-1-g3e0f09c
Alex Vandiver
alexmv at bestpractical.com
Wed Sep 8 13:18:09 EDT 2010
The branch, master has been updated
via 3e0f09c7694f2568621be7987f0f9e609f92ba38 (commit)
from bc66aeac7a19636266552ce981e3fe4e712810c8 (commit)
Summary of changes:
lib/Net/IMAP/Server/Command/Uid.pm | 2 +-
lib/Net/IMAP/Server/Message.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 3e0f09c7694f2568621be7987f0f9e609f92ba38
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Sun Sep 5 12:01:52 2010 -0400
Prepend, rather than append, un-asked-for message attributes (FLAGS, UID)
Some clients apparently throw a hissy fit if server-provided string
literals do not come last. Attempt to humor them by putting UID and
FLAGS responses at the start of each response line, rather than the
end.
Reported-by: Chia-liang Kao <clkao at bestpractical.com>
diff --git a/lib/Net/IMAP/Server/Command/Uid.pm b/lib/Net/IMAP/Server/Command/Uid.pm
index cad143b..81de432 100644
--- a/lib/Net/IMAP/Server/Command/Uid.pm
+++ b/lib/Net/IMAP/Server/Command/Uid.pm
@@ -45,7 +45,7 @@ sub fetch {
my ( $messages, $spec ) = @_;
$spec = [$spec] unless ref $spec;
- push @{$spec}, "UID" unless grep {uc $_ eq "UID"} @{$spec};
+ unshift @{$spec}, "UID" unless grep {uc $_ eq "UID"} @{$spec};
my @messages = $self->connection->selected->get_uids($messages);
for my $m (@messages) {
$self->untagged_response( $self->connection->sequence($m)
diff --git a/lib/Net/IMAP/Server/Message.pm b/lib/Net/IMAP/Server/Message.pm
index 40fc2e2..4657f91 100644
--- a/lib/Net/IMAP/Server/Message.pm
+++ b/lib/Net/IMAP/Server/Message.pm
@@ -384,7 +384,7 @@ sub fetch {
# If so, update, and possibly also inform the user; do it
# "silently" because we'll report the FLAGS change ourselves
$self->set_flag('\Seen', 1);
- push @parts, "FLAGS" if not grep { uc $_ eq "FLAGS" } @parts;
+ unshift @parts, "FLAGS" if not grep { uc $_ eq "FLAGS" } @parts;
}
my @out;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list