Revision: 88
http://svn.sourceforge.net/nmailserver/?rev=88&view=rev
Author: tmyroadctfig
Date: 2006-11-22 04:54:03 -0800 (Wed, 22 Nov 2006)
Log Message:
-----------
Fixed a defect in the fetch command (BUG 1601117).
Modified Paths:
--------------
NMail/trunk/NMail.ImapService/Command/FetchCommand.cs
NMail/trunk/NMail.ImapService/State/ExamineState.cs
Modified: NMail/trunk/NMail.ImapService/Command/FetchCommand.cs
===================================================================
--- NMail/trunk/NMail.ImapService/Command/FetchCommand.cs 2006-11-11 13:00:13 UTC (rev 87)
+++ NMail/trunk/NMail.ImapService/Command/FetchCommand.cs 2006-11-22 12:54:03 UTC (rev 88)
@@ -294,7 +294,11 @@
} else if (bodyString == "TEXT") {
this.sectionType = FetchBodySectionType.Text;
- } else {
+ } else if (bodyString == string.Empty) {
+ // No sections specified, default to all
+ this.sectionType = FetchBodySectionType.All;
+
+ } else {
this.sectionType = FetchBodySectionType.Section;
}
Modified: NMail/trunk/NMail.ImapService/State/ExamineState.cs
===================================================================
--- NMail/trunk/NMail.ImapService/State/ExamineState.cs 2006-11-11 13:00:13 UTC (rev 87)
+++ NMail/trunk/NMail.ImapService/State/ExamineState.cs 2006-11-22 12:54:03 UTC (rev 88)
@@ -245,7 +245,14 @@
protected virtual void sendBody(FetchResponse response, int messageUid, ref MessageHeaders messageHeaders, FetchBodyItem bodyItem, bool peek) {
string data = "BODY";
- if (bodyItem.SectionType == FetchBodySectionType.HeaderFields) {
+ if (bodyItem.SectionType == FetchBodySectionType.All) {
+ // Get the entire message from the local store
+ Message message = LocalStore.GetMessage(Session.AuthenticationToken, messageUid, this.selectedFolder);
+
+ data += "[] {" + message.Size + "}" + this.Session.Connection.Terminator + message.Data.ToString();
+ response.AppendResponseItem(data);
+
+ } else if (bodyItem.SectionType == FetchBodySectionType.HeaderFields) {
ensureMessageHeaders(messageUid, ref messageHeaders);
sendHeaders(response, bodyItem.HeaderFields, messageHeaders, false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|