cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Follow up - cURL redirecting output to file in windows

From: Paul Gordon <gordonp_at_us.ibm.com>
Date: Mon, 19 Mar 2012 18:04:52 -0400

Thanks much, yes the --trace-ascii seemed to work just fine. We were
looking for the line "HTTP/1.1 200 OK" as a form of sanity checking.

Command
curl -v --trace-ascii "outfile1" http://somedatapowerdevice:port/firewall

Output to file

== Info: About to connect() to somedatapowerdevice:port (#0)
== Info: Trying IP address...
== Info: connected
== Info: Connected to somedatapowerdevice:port (#0)
=> Send header, 196 bytes (0xc4)
0000: GET firewall HTTP/1.1
002b: User-Agent: curl/7.24.0 (i386-pc-win32) libcurl/7.24.0 OpenSSL/0
006b: .9.8t zlib/1.2.5 libssh2/1.3.0
008b: Host: somedatapowerdevice:port
00b5: Accept: */*
00c2:
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 45 bytes (0x2d)
0000: X-Backside-Transport: OK OK,OK OK,FAIL FAIL
<= Recv header, 24 bytes (0x18)
0000: Connection: Keep-Alive
<= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
<= Recv header, 47 bytes (0x2f)
0000: Via: 1.1 ipaddress,1.1 somedatapowerdevice:port
<= Recv header, 37 bytes (0x25)
0000: Date: Mon, 19 Mar 2012 21:45:04 GMT
<= Recv header, 38 bytes (0x26)
0000: X-Client-IP: IP address
<= Recv header, 27 bytes (0x1b)
0000: ieb-downstream-rc: 200 OK
<= Recv header, 17 bytes (0x11)
0000: x-dp-mq-msgid:
<= Recv header, 40 bytes (0x28)
0000: Content-Type: application/octet-stream
<= Recv header, 35 bytes (0x23)
0000: X-Archived-Client-IP: ipaddress
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 5 bytes (0x5)
0000: 0
0003:
== Info: Connection #0 to host somedatapowerdevice left intact
== Info: Closing connection #0

From:
Daniel Stenberg <daniel_at_haxx.se>
To:
the curl tool <curl-users_at_cool.haxx.se>
Date:
03/19/2012 05:19 PM
Subject:
Re: Follow up - cURL redirecting output to file in windows
Sent by:
curl-users-bounces_at_cool.haxx.se

On Mon, 19 Mar 2012, Paul Gordon wrote:

> Yes the -v is just for verbose. We are simply testing that we receive a

> http 200 OK message back from the firewall. Hoping to capture that
message
> in an output file.

So let me repeat my question: what does the -v output display?

(Alternatively, use "--trace-ascii [file]" to get a full trace of
everything
sent and received by curl.)

-- 
  / 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

-------------------------------------------------------------------
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 2012-03-19