cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re[3]: socks5, problems with getting page

From: Anton Nagorniy <anton20vlad_at_mail.ru>
Date: Tue, 05 Dec 2006 16:01:12 +0300

I am using curl 7.16.0 with ssl for winxp
//=============================PROGRAM CODE=======================

   curl = _curl_easy_init();
   if(curl)
   {
     _curl_easy_setopt(curl, CURLOPT_URL, url);
     _curl_easy_setopt(curl, CURLOPT_PROXY, proxy);
     _curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
     _curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
     _curl_easy_setopt(curl, CURLOPT_COOKIELIST, "");
     _curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
     _curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
     res = _curl_easy_perform(curl);
     nc=print_cookies(curl);
     _curl_easy_cleanup(curl);
   }

    _curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
    _curl_easy_setopt(curl, CURLOPT_DEBUGDATA, debugfp);
    _curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, debugfunction);
    _curl_easy_setopt(curl, CURLOPT_URL, url);
    sendCookies(nc, curl);
    _curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
    _curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &WriteMemoryCallback);
    _curl_easy_setopt(curl, CURLOPT_PROXY, proxy);
    _curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
    _curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
    _curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
    res = _curl_easy_perform(curl);

//This page is not truncated!!! Maybe because it is the first one?
//I dont want to close connection, so I load new url:

    _curl_easy_setopt(curl, CURLOPT_URL, url1);
    res = _curl_easy_perform(curl);
//But this page is truncated.
//======================================================================

Is it normal behaviour of curl?

Here is received headers:
//====================HEADERS===========================================
HTTP/1.1 100 Continue

HTTP/1.1 302 Found

Date: Tue, 05 Dec 2006 12:55:52 GMT

Server: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_ssl/2.8.22 OpenSSL/0.9.7e

Cache-Control: private

Expires: Thu, 05 Jan 1995 22:00:00 GMT

Pragma: no-cache

Set-Cookie: HaC80bwXscjqZ7KM6VOxULOB534=4kUfN3JX2rGLgufDqbH4SW7cZCsPFha4OzyvKObUZalxP6AKb65r-AQo3qmPAO9lnWSzacaER64TUm7hvhpqQwYGpww5Ni2_CzVVk2sAnigY9bPYpRCeHJv6JqqIu1az8eLuo0; path=/; domain=.paypal.com; Secure

Set-Cookie: login_email=danielgraall%40yahoo.com; expires=Sun, 03-Jun-2007 12:55:54 GMT; path=/; domain=.paypal.com

Set-Cookie: cookie_welcome=; path=/; domain=.paypal.com

Set-Cookie: LANG=en_US; path=/; domain=.paypal.com

Set-Cookie: feel_cookie=61203133205F6C6F67696E2D7375626D697420622030202063203620776562736372206420362077656273637220652031372067656E6572616C2F41626F72742E78736C206620323120686F6D65706167652F486F6D65506167652E78736C2067203520656E5F55532068203520656E5F5553206920313120702F67656E2F61626F7274206A20313920702F77656C2F696E6465782D6F757473696465206B2031342041626F7274202D2050617950616C206C2031362057656C636F6D65202D2050617950616C20; expires=Wed, 31-Dec-1969 23:59:59 GMT; path=/; domain=.paypal.com

Location: https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=1165323352

Connection: close

Transfer-Encoding: chunked

Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 200 OK

Date: Tue, 05 Dec 2006 12:55:55 GMT

Server: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_ssl/2.8.22 OpenSSL/0.9.7e

Cache-Control: private

Expires: Thu, 05 Jan 1995 22:00:00 GMT

Pragma: no-cache

Refresh: 1; URL=https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-done&login_access=1165323352

Set-Cookie: feel_cookie=61203137205F6C6F67696E2D70726F63657373696E672062203133205F6C6F67696E2D7375626D69742063203620776562736372206420362077656273637220652032372067656E6572616C2F4C6F67696E50726F63657373696E672E78736C20662031372067656E6572616C2F41626F72742E78736C2067203520656E5F55532068203520656E5F5553206920323220702F67656E2F6C6F67696E2D70726F63657373696E67206A20313120702F67656E2F61626F7274206B2032352050726F63657373696E67204C6F67696E202D2050617950616C206C2031342041626F7274202D2050617950616C20; expires=Wed, 31-Dec-1969 23:59:59 GMT; path=/; domain=.paypal.com

Connection: close

Transfer-Encoding: chunked

Content-Type: text/html; charset=UTF-8

HTTP/1.1 200 OK

Date: Tue, 05 Dec 2006 12:55:57 GMT

Server: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_ssl/2.8.22 OpenSSL/0.9.7e

Cache-Control: must-revalidate, proxy-revalidate, no-cache

Set-Cookie: HaC80bwXscjqZ7KM6VOxULOB534=v1Qm5iSKiqmaG_77SAZzWw7GxxMuazaK70SZAap4m5X0Q6H-1w6HzoyS8JMKIzOzSFAYPlurpwfYKGCc68_lc-uOpxTOuILOqMuceSXNCLYx4SIDvUSjeXLLcyzLZlwHMe6B8W; path=/; domain=.paypal.com; Secure

Set-Cookie: feel_cookie=612038205F6163636F756E742062203137205F6C6F67696E2D70726F63657373696E67206320362077656273637220642036207765627363722065203137206163636F756E742F496E6465782E78736C20662032372067656E6572616C2F4C6F67696E50726F63657373696E672E78736C2067203520656E5F55532068203520656E5F5553206920313120702F6163632F696E646578206A20323220702F67656E2F6C6F67696E2D70726F63657373696E67206B203139204D79204163636F756E74202D2050617950616C206C2032352050726F63657373696E67204C6F67696E202D2050617950616C20; expires=Wed, 31-Dec-1969 23:59:59 GMT; path=/; domain=.paypal.com

Connection: close

Transfer-Encoding: chunked

Content-Type: text/html; charset=UTF-8
//=========================================================================

Debug info text:

//===========================CURL_INFO_TEXT================================

About to connect() to proxy 24.37.140.213 port 25309 (#0)
  Trying 24.37.140.213... connected
Connected to www.paypal.com (24.37.140.213) port 25309 (#0)
error setting certificate verify locations, continuing anyway:
  CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
SSLv2, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server key exchange (12):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSL connection using DHE-RSA-AES256-SHA
Server certificate:
         subject: /C=US/ST=California/L=Mountain View/O=Paypal Inc./OU=Information Systems/OU=Terms of use at www.verisign.com/rpa (c)00/CN=www.paypal.com
         start date: 2006-02-09 00:00:00 GMT
         expire date: 2008-02-09 23:59:59 GMT
         common name: www.paypal.com (matched)
         issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
Added cookie HaC80bwXscjqZ7KM6VOxULOB534="qv4F-IB4INc7ZhHo7wSUL7kuOy_Gu0MqibhGpf2Gz4hIU8qrjqNFyTNATnE4EGq1kuCSJtYylyh8U4_nbKVItpDt90ms9ywzmrqExpX9nui4EhQKhYAqPi8eXEx7JmHcv9h-IG" for domain paypal.com, path /, expire 0
Added cookie login_email="danielgraall%40yahoo.com" for domain paypal.com, path /, expire 1180875248
Added cookie cookie_welcome="" for domain paypal.com, path /, expire 0
Added cookie LANG="en_US" for domain paypal.com, path /, expire 0
Replaced cookie feel_cookie="61203133205F6C6F67696E2D7375626D697420622030202063203620776562736372206420362077656273637220652031372067656E6572616C2F41626F72742E78736C206620323120686F6D65706167652F486F6D65506167652E78736C2067203520656E5F55532068203520656E5F5553206920313120702F67656E2F61626F7274206A20313920702F77656C2F696E6465782D6F757473696465206B2031342041626F7274202D2050617950616C206C2031362057656C636F6D65202D2050617950616C20" for domain paypal.com, path /, expire -1
Issue another request to this URL: 'https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=1165323247'
Disables POST, goes with GET
Examining connection #0 for reuse
Re-using existing connection! (#0) with host www.paypal.com
Connected to www.paypal.com (24.37.140.213) port 25309 (#0)
SSLv3, TLS alert, Client hello (1):
Connection died, retrying a fresh connect
Issue another request to this URL: 'https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=1165323247'
Examining connection #0 for reuse
Connection #0 seems to be dead!
Closing connection #0
SSLv3, TLS alert, Client hello (1):
About to connect() to proxy 24.37.140.213 port 25309 (#0)
  Trying 24.37.140.213... connected
Connected to www.paypal.com (24.37.140.213) port 25309 (#0)
error setting certificate verify locations, continuing anyway:
  CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
SSLv2, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server key exchange (12):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSL connection using DHE-RSA-AES256-SHA
Server certificate:
         subject: /C=US/ST=California/L=Mountain View/O=Paypal Inc./OU=Information Systems/OU=Terms of use at www.verisign.com/rpa (c)00/CN=www.paypal.com
         start date: 2006-02-09 00:00:00 GMT
         expire date: 2008-02-09 23:59:59 GMT
         common name: www.paypal.com (matched)
         issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
Replaced cookie feel_cookie="61203137205F6C6F67696E2D70726F63657373696E672062203133205F6C6F67696E2D7375626D69742063203620776562736372206420362077656273637220652032372067656E6572616C2F4C6F67696E50726F63657373696E672E78736C20662031372067656E6572616C2F41626F72742E78736C2067203520656E5F55532068203520656E5F5553206920323220702F67656E2F6C6F67696E2D70726F63657373696E67206A20313120702F67656E2F61626F7274206B2032352050726F63657373696E67204C6F67696E202D2050617950616C206C2031342041626F7274202D2050617950616C20" for domain paypal.com, path /, expire -1
Examining connection #0 for reuse
Connection #0 seems to be dead!
Closing connection #0
SSLv3, TLS alert, Client hello (1):
About to connect() to proxy 24.37.140.213 port 25309 (#0)
  Trying 24.37.140.213... connected
Connected to www.paypal.com (24.37.140.213) port 25309 (#0)
error setting certificate verify locations, continuing anyway:
  CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
SSLv2, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server key exchange (12):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSL connection using DHE-RSA-AES256-SHA
Server certificate:
         subject: /C=US/ST=California/L=Mountain View/O=Paypal Inc./OU=Information Systems/OU=Terms of use at www.verisign.com/rpa (c)00/CN=www.paypal.com
         start date: 2006-02-09 00:00:00 GMT
         expire date: 2008-02-09 23:59:59 GMT
         common name: www.paypal.com (matched)
         issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
Replaced cookie HaC80bwXscjqZ7KM6VOxULOB534="Inix1uzMFTjE-sdBX-95Xa6dvkdnydZDULmVmNDR_3V-K2fOs5i_2QKdeJDQzGVNRY-T8TzGT86jhm84m2G7eYyTxYV0PKU4lLEpAZIsjqibrSpMpY8y5389SxoQq6IWN-UfbG" for domain paypal.com, path /, expire 0
Replaced cookie feel_cookie="612038205F6163636F756E742062203137205F6C6F67696E2D70726F63657373696E67206320362077656273637220642036207765627363722065203137206163636F756E742F496E6465782E78736C20662032372067656E6572616C2F4C6F67696E50726F63657373696E672E78736C2067203520656E5F55532068203520656E5F5553206920313120702F6163632F696E646578206A20323220702F67656E2F6C6F67696E2D70726F63657373696E67206B203139204D79204163636F756E74202D2050617950616C206C2032352050726F63657373696E67204C6F67696E202D2050617950616C20" for domain paypal.com, path /, expire -1
Failed writing body
Failed writing data
failed writing received data to disk/application

//=========================================================================

 
Received on 2006-12-05