cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Windows 7 Curl -K reading command lines from a file

From: Jay Whipple III <jay3_at_ospreypartners.com>
Date: Thu, 5 Aug 2010 06:42:43 -0400

Results using -v:

Command LIne works using:

curl -v -k --silent --header "Authorization: GoogleLogin auth=DQAAAJkAAAD8cretV4Te0Jm23sGHliGMzfQn2owjJXO1_Ew7UZLX4LWfqRnsgGGjO1sREEcKHsucoiRcKKI3GVWbPQSNyGUdBD3aul5tAuJ-ZTf81YPs2O15a0mIFrmdi3my5y_T2gMpHnquqlnWlfTuCv2cecb6o5garWnhcS2uq-zec8KSWYI9ZMRt5h5NXXWl1ui7XrLnnhr2oB_WSAsm3csFIXZA" "http://spreadsheets.google.com/tq?tqx=out:csv&key=0Auawp6xt4oMIdGdzR2JTMDl0SWFmdEtYUmVBc21zZWc&amp;sheet=od6"

"Email Address","Email Type","List: Founding Members","List: Contributing Members","List: Members","List: Prospects","List: Pros","List: Press","List: General Interest","List: Game Directors","List: update","List: Relaxed Bridge","Date Added","Added By","First Name","Middle Name","Last Name","Job Title","Company Name","Work Phone","Home Phone","Address Line 1","Address Line 2","Address Line 3","City","US State/CA Province","Other State/Province","Country","Zip/Postal Code","Sub Zip/Postal Code","Notes","Custom field 1","Custom field 2","Custom field 3","Custom field 4","Custom field 5","Custom field 6","Custom field 7","Custom field 8","Custom field 9","Custom field 10","Custom field 11","Custom field 12","Custom field 13","Custom field 14","Custom field 15""johnackermann_at_yahoo.com","HTML","","","","x","","","","","xx","","10/19/09 11:47 AM EDT","Site owner","John","","Ackermann","","!BGDBC Directory (2010-06-08 18.02.26)","","","","","","","","","","","","",0.00,0.00,"","","","","","","","","","","","","""bocagrandeduplicatebc_at_gmail.com","HTML","","","","","","","x","","x","","4/25/09 5:56 PM EDT","Site owner","BGDBC","","Administrator","(Admin)","!BGDBC Directory (2010-06-08 18.02.26)","","","","","","Boca Grande","Fl","","","","","Club # 261776",0.00,0.00,"","","","","","","","","","","","","""janeadrian_at_gmail.com","HTML","x","","","","","","","","x","","4/25/09 6:25 PM EDT","Site owner","Jane","","Adrian","(Founding Member)","!BGDBC Directory (2010-06-08 18.02.26)","612-508-4487","941-964-5747","PO Box 861","27B BGC","","Boca Grande","FL","","","33921-0861","9378960","",10.71,11.59,"","","","","","","","","","","","","""muzzy320_at_gmail.com","","","","","","","","","","","","","","Ann","","Aikens","(Relaxed Bridge)","!BGDBC Directory (2010-06-08 18.02.26)","","","","","","","","","","","","",0.00,0.00,"","","","","","","","","","","","","""j33j32_at_hotmail.com","HTML","","","x","","","","","","x","","5/9/09 3:04 PM EDT","Site owner","Jennie","","Albertson","(Regular Member)","!BGDBC Directory (2010-06-08 18.02.26)","","941-964-1824","PO Box 1997","","","Boca Grande","FL","","","33921-1997","K499959","",8.09,661.19,"","","","","","","","","","","","","""s.allgyer_at_comcast.net","HTML","","","","x","","","","","x","","5/9/09 3:04 PM EDT","Site owner","Sally","","Allgyer","(Regular Member)","!BGDBC Directory (2010-06-08 18.02.26)","964-6415","","","","","Boca Grande","FL","","","","","",0.77,0.77,"","","","","","","","","","","","","""ardrey18_at_optonline.net","HTML","","","","x","","","","","x","","5/9/09 3:04 PM EDT","Site owner","Joan","","Ardrey","(Regular Member)","!BGDBC Directory (2010-06-08 18.02.26)","","41-964-2260","","","","Boca Grande","FL","","","","","",0.61,0.61,"","","","","","","","","","","","","""jeanrarmour_at_earthlink.net","HTML","","","x","","","","","","x","","6/16/09 5:45 PM EDT","Site owner","Jean","","Armour","(Reg..............

........
* Trying 72.14.204.113... connected
* Connected to spreadsheets.google.com (72.14.204.113) port 80 (#0)
> GET /tq?tqx=out:csv&key=0Auawp6xt4oMIdGdzR2JTMDl0SWFmdEtYUmVBc21zZWc&amp;sheet=od6 HTTP/1.1

> User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3

> Host: spreadsheets.google.com

> Accept: */*

> Authorization: GoogleLogin auth=DQAAAJkAAAD8cretV4Te0Jm23sGHliGMzfQn2owjJXO1_Ew7UZLX4LWfqRnsgGGjO1sREEcKHsucoiRcKKI3GVWbPQSNyGUdBD3aul5tAuJ-ZTf81YPs2O15a0mIFrmdi3my5y_T2gMpHnquqlnWlfTuCv2cecb6o5garWnhcS2uq-zec8KSWYI9ZMRt5h5NXXWl1ui7XrLnnhr2oB_WSAsm3csFIXZA

>

< HTTP/1.1 200 OK

< Content-Type: text/csv; charset=UTF-8

< content-disposition: attachment; filename=data.csv

< Date: Thu, 05 Aug 2010 10:28:21 GMT

< Expires: Thu, 05 Aug 2010 10:28:21 GMT

< Cache-Control: private, max-age=0

< X-Content-Type-Options: nosniff

< X-XSS-Protection: 1; mode=block

< Server: GSE

< Transfer-Encoding: chunked

<

{ [data not shown]
* Connection #0 to host spreadsheets.google.com left intact
* Closing connection #0

However when I try -K

curl -v -q -k -K "c:\Users\Jay3\Documents\curl.cmd" "http://spreadsheets.google.com/tq?tqx=out:csv&key=0Auawp6xt4oMIdGdzR2JTMDl0SWFmdEtYUmVBc21zZWc&amp;sheet=od6"

I now get:

"Error: Access denied. Access denied"* About to connect() to spreadsheets.google.com port 80 (#0)
* Trying 72.14.204.113... connected
* Connected to spreadsheets.google.com (72.14.204.113) port 80 (#0)
> GET /tq?tqx=out:csv&key=0Auawp6xt4oMIdGdzR2JTMDl0SWFmdEtYUmVBc21zZWc&amp;sheet=od6 HTTP/1.1

> User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3

> Host: spreadsheets.google.com

> Accept: */*

>

< HTTP/1.1 200 OK

< Content-Type: text/csv; charset=UTF-8

< content-disposition: attachment; filename=data.csv

< Date: Thu, 05 Aug 2010 10:39:11 GMT

< Expires: Thu, 05 Aug 2010 10:39:11 GMT

< Cache-Control: private, max-age=0

< X-Content-Type-Options: nosniff

< X-XSS-Protection: 1; mode=block

< Server: GSE

< Transfer-Encoding: chunked

<

{ [data not shown]
* Connection #0 to host spreadsheets.google.com left intact
* Closing connection #0

Its as though the -K is not working at all......?????????

On Aug 4, 2010, at 5:12 PM, Daniel Stenberg wrote:

> On Wed, 4 Aug 2010, Jay Whipple III wrote:
>
>> If I pass the curl.cmd commands through on the original line I have no
>> problem...
>
>> What am I doing wrong with the use o
>> f -K command?
>
> I don't know.
>
> If you use -v I figure you should be able to tell how the request differ in
> the error case and then you can tell us!
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html

_______________

What's Next?

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-05