Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 1600  / 2 Years ago, sat, june 25, 2022, 3:54:00

I want to see the tcp communication when I make a http POST to a url.



What I am looking for is, if they send a redirect during the tcp handshake.



How can I test for this?



e.g. I make a http post to www.example.com/1/2 and then the server responds with a redirect to www10.example.com/1/2



I have to sent a http post, and the posted value has to be an xml document. (I have a sample xml file on disk that I can send if the utility allows this).


More From » networking

 Answers
7

Use either tcpdump (a command-line utility) or wireshark (a GUI tool).



Wireshark is somewhat easier to use, it will capture all traffic from your network interface. You'd start a capture with wireshark, then go to your browser and do the transaction you want to do, then back in wireshark you just need to identify an http packet (they're clearly marked as such in the capture), right-click and select "follow tcp stream". This will show you the whole conversation including http headers, which should in turn include the redirects.



Tcpdump in essence does the same: it intercepts network traffic and lets you look at it, but since (AFAIK) it has no knowledge of specific protocols, it's up to you to make sense of the captured traffic.



One other option is for you to install the Live HTTP headers extension for Firefox. When you enable it, it will capture the request as sent by your browser, any responses sent by the server including redirects. It's potentially easier to use than Wireshark but it's limited to showing you headers from the browser.


[#40824] Saturday, June 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lassrake

Total Points: 400
Total Questions: 103
Total Answers: 98

Location: Netherlands
Member since Mon, Jun 22, 2020
4 Years ago
;