james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1509303 - in /james/protocols/trunk/imap/src/main/java/org/apache/james/imap: processor/fetch/FetchProcessor.java utils/
Date Thu, 01 Aug 2013 15:39:41 GMT
Author: eric
Date: Thu Aug  1 15:39:40 2013
New Revision: 1509303

URL: http://svn.apache.org/r1509303
Log:
FETCH CHANGEDSINCE returns unchanged messages, patch contributed by Jan-Philipp Niewerth (IMAP-375)

Removed:
    james/protocols/trunk/imap/src/main/java/org/apache/james/imap/utils/
Modified:
    james/protocols/trunk/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java

Modified: james/protocols/trunk/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java?rev=1509303&r1=1509302&r2=1509303&view=diff
==============================================================================
--- james/protocols/trunk/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
(original)
+++ james/protocols/trunk/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
Thu Aug  1 15:39:40 2013
@@ -160,6 +160,12 @@ public class FetchProcessor extends Abst
             MessageResultIterator messages = mailbox.getMessages(ranges.get(i), resultToFetch,
mailboxSession);
             while (messages.hasNext()) {
                 final MessageResult result = messages.next();
+                
+                //skip unchanged messages - this should be filtered at the mailbox level
to take advantage of indexes
+                if(fetch.isModSeq() && result.getModSeq() <= fetch.getChangedSince())
{
+                	continue;
+                }
+                
                 try {
                     final FetchResponse response = builder.build(fetch, result, mailbox,
session, useUids);
                     responder.respond(response);



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message