Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
libcurl POP3 expects "CRLF.CRLF" eob for single-line response from certain commands. #740
I did this
I have a situation where I need to get UIDL for specific message number in POP3 mailbox. Used following
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "UIDL 1"))
But it does't work. libcurl gets stuck waiting for data until timeout. (It only works with CURLOPT_NOBODY set to 0).
POP3 expects "\x0d\x0a\x2e\x0d\x0a" (CRLF.CRLF) even for single-line response for certain commands. I have seen this with following commands UIDL msg, STAT, RSET, NOOP etc.
Is there any workaround to store response data from custom POP3 requests, which return single line response with EOB as "CRLF"?
(I don't want to use "UIDL" that returns list of msg, UIDL pair and parse it to get specific UIDL)
I expected the following
When performing "UIDL msg", curl_easy_perform should return immediately after receiving + OK < msg > < UIDL > CRLF
Ubuntu 14.04.3 LTS
This is currently intended behaviour, in that you have to tell libcurl not to expect a body, when dealing with one line response commands. Please see the POP3 examples and test cases which show this for the NOOP and DELE commands.
However, we are open to code modifications which negate the need to do this without breaking API compatibility if you fancy a challenge ;-)