Hello, I have a similar question to the previous one about fetching a non existent message sequence.
What exactly should server do when fetching a message with invalid MIME header or body?
This was asked a some time ago. Timo Sirainen answered it well in the recent thread about BINARY; look at the archives.
For example, in case of FETCH ENVELOPE there might be a message in the sequence with a broken e-mail address in one of the required RFC822 headers. Parsing of such a message would end up in an error condition. Should the server send an untagged NO response and continue with processing the sequence with the final tagged OK response, or should it stop the processing immediately and issue a tagged NO response?
It should continue processing and complete with NO or BAD.
For example, something like this is good:
C: a fetch 1:3 body[2]
S: * 1 fetch (body[2] {123}
...
)
S: * 2 fetch (body[2] NIL)
S: * 3 fetch (body[2] {4567}
...
)
S: a NO parse error during processing of message 2IMO, whether or not to send the NIL response depends on the nature of the error. I'm a little uncertain about what makes the most sense there.
I think this is not stated by the RFC, so I am asking for a common practice, or a best possible solution.
This is the best practice, because it permits caching clients to work well. Each untagged response is parsable, processable and cachable on its own, without reference to the command(s) being executed.
--Arnt
