cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL Help

From: Plunkett, David <dwplunkett_at_novanthealth.org>
Date: Mon, 17 Apr 2006 10:07:43 -0400

I'm new at using cURL and I'm having a problem with sending a file to one of our vendors. I'm able to get the file to the vendor but it takes 3 attempts before the file is successfully sent. I originally thought this was a problem with the vendor. I sent them the output from cURL after each attempt and I was told it was working correctly. On try #1 : You connect, the server responds with an Auth required. On try #2 : You connect, respond to the auth challenge, and get your cookie. On try #3 : You connect present the auth cookie and are allowed to proceed. Can anyone tell me how I can send the file in just 1 attempt? Please see below for version and output. Thanks, David Plunkett Integration/EDI Team Novant Health Command curl -v -T fileName -b cookieFile -c cookieFile -u remoteUser:remotePass https://hostName Version curl 7.12.3 (powerpc-ibm-aix5.2.0.0) libcurl/7.12.3 OpenSSL/0.9.7b zlib/1.1.4 libidn/0.5.9 Protocols: ftp gopher telnet dict ldap http file https ftps Features: IDN IPv6 Largefile NTLM SSL libz Output Attempt 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>401 Authorization Required</TITLE> </HEAD><BODY> <H1>Authorization Required</H1> This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.<P> </BODY></HTML> * About to connect() to secureftp.aetna.com port 443 * Trying 206.213.251.60... * connected * Connected to secureftp.aetna.com (206.213.251.60) port 443 * successfully set certificate verify locations: * CAfile: /opt/TWWfsw/curl712/share/ca-bundle.crt CApath: none * SSL connection using AES256-SHA * Server certificate: * subject: /emailAddress=PKIAdmin@aetna.com/ST=Connecticut/L=Middletown/C=US/O=Aetn a Life Insurance Company/CN=secureftp.aetn a.com * start date: 2005-09-07 18:45:12 GMT * expire date: 2007-09-08 14:25:24 GMT * subjectAltName: secureftp.aetna.com matched * issuer: /C=US/O=Aetna/CN=Aetna, Inc. - SSL CA * SSL certificate verify ok. * Server auth using Basic with user 'CThompson7' > PUT /novanthealthaet1000%2Etxt HTTP/1.1 Authorization: Basic Q1Rob21wc29uNzphYmMxMjM= User-Agent: curl/7.12.3 (powerpc-ibm-aix5.2.0.0) libcurl/7.12.3 OpenSSL/0.9.7b zlib/1.1.4 libidn/0.5.9 Host: secureftp.aetna.com Pragma: no-cache Accept: */* Cookie: FDX=PjrqzGFybdbdlX1eDVzpgA== Content-Length: 1628627 Expect: 100-continue < HTTP/1.1 401 Authorization Required < Date: Sat, 15 Apr 2006 13:31:03 GMT < Server: SecureTransport/4.3.0.1 * Replaced cookie FDX="" for domain secureftp.aetna.com, path /, expire 0 < Set-Cookie: FDX=; path=/ * Authentication problem. Ignoring this. < WWW-Authenticate: Basic realm="FileDriveWWW" < Connection: close < Content-Type: text/html; charset=UTF-8 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed ^M 0 1590k 0 397 0 0 544 0 --:--:-- --:--:-- --:--:-- 544^M 0 1590k 0 397 0 0 544 0 --:- -:-- --:--:-- --:--:-- 0* Closing connection #0 Output Attempt 2 Virtual user CThompson7 logged in. * About to connect() to secureftp.aetna.com port 443 * Trying 206.213.251.60... * connected * Connected to secureftp.aetna.com (206.213.251.60) port 443 * successfully set certificate verify locations: * CAfile: /opt/TWWfsw/curl712/share/ca-bundle.crt CApath: none * SSL connection using AES256-SHA * Server certificate: * subject: /emailAddress=PKIAdmin@aetna.com/ST=Connecticut/L=Middletown/C=US/O=Aetn a Life Insurance Company/CN=secureftp.aetn a.com * start date: 2005-09-07 18:45:12 GMT * expire date: 2007-09-08 14:25:24 GMT * subjectAltName: secureftp.aetna.com matched * issuer: /C=US/O=Aetna/CN=Aetna, Inc. - SSL CA * SSL certificate verify ok. * Server auth using Basic with user 'CThompson7' > PUT /novanthealthaet1000%2Etxt HTTP/1.1 Authorization: Basic Q1Rob21wc29uNzphYmMxMjM= User-Agent: curl/7.12.3 (powerpc-ibm-aix5.2.0.0) libcurl/7.12.3 OpenSSL/0.9.7b zlib/1.1.4 libidn/0.5.9 Host: secureftp.aetna.com Pragma: no-cache Accept: */* Cookie: FDX= Content-Length: 1628627 Expect: 100-continue % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed ^M 0 1590k 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0^M 9 1590k 0 0 9 144k 0 98k 0:0 0:16 0:00:01 0:00:15 702k^M 12 1590k 0 0 12 192k 0 69454 0:00:23 0:00:02 0:00:21 121k< HTTP/1.1 200 OK < Date: Sat, 15 Apr 2006 13:38:03 GMT < Server: SecureTransport/4.3.0.1 * Replaced cookie FDX="QwvqCKk0rKHwoFuDuTRIAQ==" for domain secureftp.aetna.com, path /, expire 0 < Set-Cookie: FDX=QwvqCKk0rKHwoFuDuTRIAQ==; path=/ < Accept-Ranges: bytes < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Features: CHPWD;RTCK;STCK;ASC;DNDISP < Transfer-Encoding: chunked < Content-Type: text/plain; charset=UTF-8 ^M 22 1590k 0 35 22 352k 10 100k 0:00:15 0:00:03 0:00:12 157k^M 42 1590k 0 35 42 672k 7 149k 0:0 0:10 0:00:04 0:00:06 207k^M 61 1590k 0 35 61 976k 6 178k 0:00:08 0:00:05 0:00:03 230k^M 82 1590k 0 35 82 1312k 5 203k 0:00:07 0:00:06 0:00:01 233k^M100 1590k 0 35 100 1590k 4 219k 0:00:07 0:00:07 --:--:-- 315k* Connection #0 to host secureftp.aetna.com left intact * Closing connection #0 Output Attempt 3 * About to connect() to secureftp.aetna.com port 443 * Trying 206.213.251.60... * connected * Connected to secureftp.aetna.com (206.213.251.60) port 443 * successfully set certificate verify locations: * CAfile: /opt/TWWfsw/curl712/share/ca-bundle.crt CApath: none * SSL connection using AES256-SHA * Server certificate: * subject: /emailAddress=PKIAdmin@aetna.com/ST=Connecticut/L=Middletown/C=US/O=Aetn a Life Insurance Company/CN=secureftp.aetn a.com * start date: 2005-09-07 18:45:12 GMT * expire date: 2007-09-08 14:25:24 GMT * subjectAltName: secureftp.aetna.com matched * issuer: /C=US/O=Aetna/CN=Aetna, Inc. - SSL CA * SSL certificate verify ok. * Server auth using Basic with user 'CThompson7' > PUT /novanthealthaet1000%2Etxt HTTP/1.1 Authorization: Basic Q1Rob21wc29uNzphYmMxMjM= User-Agent: curl/7.12.3 (powerpc-ibm-aix5.2.0.0) libcurl/7.12.3 OpenSSL/0.9.7b zlib/1.1.4 libidn/0.5.9 Host: secureftp.aetna.com Pragma: no-cache Accept: */* Cookie: FDX=QwvqCKk0rKHwoFuDuTRIAQ== Content-Length: 1628627 Expect: 100-continue % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed ^M 0 1590k 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0^M 0 1590k 0 0 0 0 0 0 --:- -:-- 0:00:02 --:--:-- 0^M 17 1590k 0 0 17 272k 0 99215 0:00:16 0:00:02 0:00:14 176k^M 38 1590k 0 0 38 608k 0 159k 0:00:09 0:00:03 0:00:06 238k^M 60 1590k 0 0 60 960k 0 199k 0:00:07 0:00:04 0:00:03 270k^M 81 1590k 0 0 81 1296k 0 221k 0:00:07 0:00:05 0:00:02 283k^M100 1590k 0 0 100 1590k 0 207k 0:00:07 0:00:07 --:--:-- 295k^M100 1590k 0 0 100 1590k 0 183k 0:00:08 0:00:08 --:--:-- 225k^M100 1590k 0 0 100 1590k 0 164k 0:00:09 0:00:09 --:--:-- 168k^M100 1590k 0 0 100 1590k 0 149k 0:00:10 0:00:10 --:--: -- 107k^M100 1590k 0 0 100 1590k 0 136k 0:00:11 0:00:11 --:--:-- 51852^M100 1590k 0 0 100 1590k 0 1 25k 0:00:12 0:00:12 --:--:-- 0^M100 1590k 0 0 100 1590k 0 116k 0:00:13 0:00:13 --:--:-- 0^M100 1590k 0 0 100 1590k 0 108k 0:00:14 0:00:14 --:--:-- 0^M100 1590k 0 0 100 1590k 0 101k 0:00:15 0:00:15 -- :--:-- 0< HTTP/1.1 200 OK < Date: Sat, 15 Apr 2006 13:41:02 GMT < Server: SecureTransport/4.3.0.1 < Accept-Ranges: bytes < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Features: CHPWD;RTCK;STCK;ASC;DNDISP < Transfer-Encoding: chunked < Content-Type: application/octet-stream < X-Pad: avoid browser bug ^M100 1590k 0 0 100 1590k 0 99220 0:00:16 0:00:16 --:--:-- 0^M100 1590k 0 0 100 1590k 0 99219 0:0 0:16 0:00:16 --:--:-- 0* Connection #0 to host secureftp.aetna.com left intact * Closing connection #0 ----------------------------------------- This message and any included attachments are from NOVANT HEALTH INC. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail. If you believe that any information contained in this message is disparaging or harassing on the basis of gender, race, age, disability, religion, or national origin, please contact Novant Health, Inc. at 1-888-378-8250 or 1-800-350-0094 or forward the e-mail to reports@novanthealth.org. Thank you.
Received on 2006-04-17