diff --git a/ChangeLog b/ChangeLog index d0850c935..10c399394 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-10-01 Cyril Robert + + * SoObjects/Mailer/SOGoMailFolder.m + (-appendMessage:inContext:usingId:): we no longer instantiate the + message to check whether it exists since we trust the fact that we + would receive an error from NGImap if the creation failed. + 2009-10-01 Wolfgang Sourdeau * Tests/test-maildav.py (DAVMailCollectionTest.testPUT): fixed to diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index 107c0e784..8b56fbee7 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -1133,32 +1133,18 @@ static NSString *spoolFolder = nil; NSException *error; WOResponse *response; NSString *location; - id msg; error = [self _appendMessageData: message usingId: imap4id]; - if (error) response = (WOResponse *) error; else { response = [_ctx response]; [response setStatus: 201]; - msg = [SOGoMailObject objectWithName: - [NSString stringWithFormat: @"%d", *imap4id] - inContainer: self]; - if (msg && [msg doesMailExist]) - { - location = [NSString stringWithFormat: @"%@%d.eml", - [self davURL], *imap4id]; - [response setHeader: location forKey: @"location"]; - } - else - { - response = (WOResponse *) - [NSException exceptionWithHTTPStatus: 500 - reason: @"Failed to store message"]; - } + location = [NSString stringWithFormat: @"%@%d.eml", + [self davURL], *imap4id]; + [response setHeader: location forKey: @"location"]; } return response;