On Fri, 12 Dec 2014, Patrick Monnerat wrote: > > > I've reproduced it: please find the mail data in attachment. > > However I don't believe that was the user's issue - I understand he > > was using my fix and specifying --crlf / CURLOPT_CRLF but was still > > getting problems :( > > Got it: the state is not saved properly between two data chunks.
Ah... Yes! It was resetting smtp->eob afterwards so not remembering the state on the next buffer. However, simply taking that out isn't enough to fix the problem. > That means if you submit \n terminated lines one at a time, this will fail, > even if you set the CURLOPT_CRLF option. From my own testing it would appear that this also happens for CRLF terminated lines - which is rather embarrassing :( > Unfortunately this cannot be simulated with the curl command on W$. After 3 and half years of developing for curl I have finally created a very quick Visual Studio solution that allows me to test against libcurl with such examples ;-) As such, I have pushed commit f0ecdd04d3cd3c8814a296c3a9d2211086b7abd8 which hopefully addresses this. It also highlighted an issue from my previous commits with my overzealous usage of free(). Many thanks for your assistance. Kind Regards Steve ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
