POP3: fix end of body detection

Curl_pop3_write() now has a state machine that scans for the end of a
POP3 body so that the CR LF '.' CR LF sequence can come in everything
from one up to five subsequent packets.

Test case 810 is modified to use SLOWDOWN which makes the server pause
between each single byte and thus makes the POP3 body get sent to curl
basically one byte at a time.
This commit is contained in:
Daniel Stenberg
2011-11-28 23:02:35 +01:00
parent 8d3efb6be0
commit dda815b776
2 changed files with 62 additions and 23 deletions

View File

@@ -9,6 +9,11 @@ LIST
#
# Server-side
<reply>
# We use SLOWDOWN to really exercise the end-of-body parsing over multiple
# packets
<servercmd>
SLOWDOWN
</servercmd>
# When doing LIST, we get the default list output hard-coded in the test
# POP3 server
<datacheck>
@@ -25,7 +30,7 @@ LIST
pop3
</server>
<name>
POP3 LIST messages
POP3 LIST messages from *SLOW* server
</name>
<command>
pop3://%HOSTIP:%POP3PORT/ -u user:secret