From: Jason W. <jas...@in...> - 2005-12-18 00:57:12
|
On Sat, Dec 17, 2005 at 03:52:30PM +0100, Matthias Andree wrote: > Sunil Shetye <sh...@bo...> writes: > > > Matthias, please consider this patch for 6.3.1. > > I wonder if it's the right thing to do, or if the server of the day > might return the flags or some other information along with the size. I > had a quick glance at the standard, and I'm not at all sure if it's > allowed for the server to return excess information. There is a statemenn section 2.2.2, but I am not sure whether it is meant to cover this case: " A client MUST be prepared to accept any server response at all times. This includes server data that was not requested. Server data SHOULD be recorded, so that the client can reference its recorded copy rather than sending a command to the server to request the data. In the case of certain server data, the data MUST be recorded. This topic is discussed in greater detail in the Server Responses section." I couldn't find any more specific guidance in section 7, but then I didn't read it carefully. Also, this could be read as implying only to entire responses and not to additional data included within responses that are requested. Note also that in Fetchmail, imap_fetch_body() loops until it finds the required response. > > At any case, if a server does that, we're dead in the water again. I'd > rather use a bit more of a parser to take the fetch response apart. I agree with this and would be interested in an interpretation of the RFC as well regarding whether this is expected of the client. At least it might be considered good practice; Fetchmail already contains code to deal with the eccentricities of various servers and it wouldn't hurt to generalize it here if you consider it appropriate to do so. |