tags:

views:

154

answers:

7

Hi all,

I used the same request with 2 differents client HTTP. One is accepted by server (java request in IE) and not the other (Indy Client in Delphi software) ? Is there a way to detect the request difference between the two request ?

Is there a way to hide I use Indy ?

Best regards

+1  A: 

You must be talking about User-Agent. I'm not sure how you set it in Indy but the User-Agent HTTP header identifies which client is used, so you can set it to pretend you're IE or another browser.

Also, try using an HTTP sniffer (Scoop is a good one on OSX) to see exactly what headers are being sent to make sure you behave exactly like the browser.

Evgeny Shadchnev
Note that the `user-agent` header is fully controllable by the client. Keep in mind that it can be spoofed.
BalusC
I allready set it to Mozilla 4. And it make the same.
Hugues Van Landeghem
The User-Agent is specified in the TIdHTTP.Request.UserAgent property.
Remy Lebeau - TeamB
A: 

wireshark/tcpdump is your friend in most situations when there is a need to analyse http requests.

With tcpdump you can record the request on the server, and then analyse the captured data in wireshark.

Ernelli
A: 

I think you are best of with Paros. http://www.parosproxy.org/

It will allow you to monitor, pause and customize the HTTP request on-the-fly. It's a hacker tool, but you'll love it.

Shyam
+1  A: 

UserAgent is under the Request property. By default, Indy's user agent string is "Mozilla/3.0 (compatible; Indy Library)". Change it to a current string used by FireFox, IE or other recognized browser.

You can find examples on the UserAgentString site.

There are more details in the Indy KB PDF.

Bruce McGee
+3  A: 

I recommend Fiddler2, which inserts itself as a proxy, and will record all http/https traffic, with nice inspectors. http://www.fiddlertool.com/fiddler2/version.asp

Chris Thornton
I want to listen http request on port 2000. Where to change this ?
Hugues Van Landeghem
+1 - Fiddler is the way to go, you can also modify the request on the fly which should allow you to test if it's just the user agent string that's causing it!
MarkRobinson
A: 

Don's Proxy is a nice free tool to capture HTTP requests. As you write that you are using Java, I assume that the JRE required for this tool is installed already.

Then compare the two requests using TortoiseMerge or some other diff utility.

mjustin
A: 

I finally use TidTCPClient and made my POST request by hand and it works now (it's a long time allready).

I still not understand why but I have no time to look after this.

Hugues Van Landeghem