0

I have to ensure that curl is sending cookies propertly, so I should view full text of request (not response!) http headers. Is there any way to do it?

Thank you

Kirzilla
  • 16,368
  • 26
  • 84
  • 129
  • possible duplicate of [How can I see the request headers made by curl when sending a request to the server?](http://stackoverflow.com/questions/866946/how-can-i-see-the-request-headers-made-by-curl-when-sending-a-request-to-the-serv) – Dolph Jul 08 '10 at 21:05

1 Answers1

0

Obviously, you need to intercept the request headers at some point. Considering you want to see headers from curl, I would suggest setting up a transparent proxy. For a relatively simpler solution, I would suggest a tool such as WireShark.

Dolph
  • 49,714
  • 13
  • 63
  • 88
  • It's easier to create php page with [code]foreach (getallheaders() as $name => $value) echo "$name: $value\n";[/code]. UPD: Thank you for sharing WireShark, it's really nice idea to sniff all http traffic to figure out what headers curl is using for request. – Kirzilla Jul 08 '10 at 21:03
  • I didn't see the `php` tag... I assumed you were running curl from the command line. Marking your question as a dupe (see answer for php): http://stackoverflow.com/questions/866946/how-can-i-see-the-request-headers-made-by-curl-when-sending-a-request-to-the-serv/2138886#2138886 – Dolph Jul 08 '10 at 21:05