curl-library
Re: Issue with IMAP UID FETCH
Date: Thu, 17 Apr 2014 18:56:37 +0300
On 4/10/14, 12:09 AM, Steve Holme wrote:
>>> Currently all custom requests for IMAP overload the behaviour of a
>>> LIST command :(
>>
>> If i wanted to fix this how would i go about it? I am not yet familiar
>> enough with the code.
>
> If I was you and if I was totally new to the project (and I'm assuming you
> are - apologies if you are not) I would recommend:
>
The attached patch fixes this issue, where the library would return only
the first line of a response to a custom request that included a string
literal (http://tools.ietf.org/html/rfc3501#section-4.3).
The attached patch introduces the imap_perform_custom(...) action, the
imap_state_custom_resp(...) handler, the IMAP_CUSTOM state and the
octet_count variable in the imap_conn structure.
Given a response to a custom request, the response handler checks
whether it ends in {<count>}\r\n. When it does it sets the octet_count
in imap_conn. This count in conjunction with the IMAP_CUSTOM state, are
used by the imap_endofresp(...) to determine whether the fetched data
are expected or not.
Could i have your feedback before i continue with unit tests etc?
Thank you, kind regards,
-- Dionysios Kalofonos
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/plain attachment: stored