cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem downloading files greater than 32Mb after upgrading from 7.14 to 7.20.1

From: David Tong <david.tong_at_oracle.com>
Date: Mon, 21 Nov 2011 22:30:33 -0800

I have a legacy project that recently upgraded libcurl from 7.14 to 7.20
(and yes I know that's not the latest)
as well as upgrading OpenSSL from 0.9.7 to 1.0.0c

The project uses libcurl to download binary objects via SSL. I'm finding
that objects over 32Mb in size fail to download.
Looking in detail it seems that the first block (less than, but close to
32Mb) downloads successfully. The code then attempts
to connect again to download more data, but the connection fails. The
issue appears to be related to re-using the connection
and may also be related to the fact that the SSL certificate is
self-signed.
Re-running the same code after a download failure starts a new session
and the download resumes and completes.

I tried explicitly setting CURLOPT_SSL_VERIFYPEER to false in case that
was somehow getting set to true,
but that did not appear to help. I also turned on debugging. Here's what
was output during the second connection using curl 7.14

< HTTP/1.0 200 Connection established
<
* Proxy replied OK to CONNECT request
* error setting certificate verify locations, continuing anyway:
* CAfile: {PATH TO FILE THAT DOES NOT EXIST}
   CApath: none
* SSL re-using session ID
* SSL connection using RC4-MD5
* Server certificate:
* [blah blah]
* SSL certificate verify result: error number 1 (20), continuing anyway.
* Server auth using Basic with user 'foo_at_bar.com'
> GET /object.zip HTTP/1.0
Authorization: Basic ZGF2aWQudG9uZ0BvcmFjbGUuY29tOjs1SGFmdGlk
Accept: */*
Range: bytes=33261352-63353018

And here's what I see with the same code using 7.20:

< HTTP/1.0 200 Connection established^M
< ^M
* Proxy replied OK to CONNECT request
* Unknown SSL protocol error in connection to [SERVER]
* Closing connection #0

Any suggestions would be appreciated
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-22