curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: response reading failed

From: Christian Schmitz via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 25 Sep 2019 17:58:05 +0200

Hello,

There is something we see in the logs, when this happens.
And that is progress:

Progress 0 of 0 bytes downloaded: 0%, 65537 of 139150 bytes uploaded: 47%

A normal email sending would be:

25.09.2019 17:13:35: DATA
25.09.2019 17:13:35: 354 End data with <CR><LF>.<CR><LF>
25.09.2019 17:13:35: Progress 0 of 0 bytes downloaded: 0%, 65537 of 139154 bytes uploaded: 47%
25.09.2019 17:13:35: Progress 0 of 0 bytes downloaded: 0%, 131073 of 139154 bytes uploaded: 94%
25.09.2019 17:13:35: Progress 0 of 0 bytes downloaded: 0%, 139155 of 139154 bytes uploaded: 100%
25.09.2019 17:13:35: 250 OK queued as 50edd006-c586-4eaa-9905-67507228b41d
25.09.2019 17:13:35: Connection #0 to host in-v3.mailjet.com left intact

Now I saw we set CURLOPT_BUFFERSIZE to 16384 in some older code. Not sure why.

I can comment that out and set CURLOPT_UPLOAD_BUFFERSIZE to 32768 and now it works reliable as far as I see:

25.09.2019 17:56:35: DATA
25.09.2019 17:56:35: 354 End data with <CR><LF>.<CR><LF>
25.09.2019 17:56:35: Progress 0 of 0 bytes downloaded: 0%, 32769 of 154151 bytes uploaded: 21%
25.09.2019 17:56:35: Progress 0 of 0 bytes downloaded: 0%, 65537 of 154151 bytes uploaded: 43%
25.09.2019 17:56:36: Progress 0 of 0 bytes downloaded: 0%, 98305 of 154151 bytes uploaded: 64%
25.09.2019 17:56:36: Progress 0 of 0 bytes downloaded: 0%, 131073 of 154151 bytes uploaded: 85%
25.09.2019 17:56:36: Progress 0 of 0 bytes downloaded: 0%, 154152 of 154151 bytes uploaded: 100%
25.09.2019 17:56:36: 250 OK queued as e6d6a58a-f93a-47f8-9e41-bcd77ed93e32
25.09.2019 17:56:36: Connection #0 to host in-v3.mailjet.com left intact

So could it be there is trouble when CURL sends 65537 bytes and the buffer size is just 16384?

Sincerely
Christian

-- 
Read our blog about news on our plugins:
http://www.mbsplugins.de/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-09-25