Pergunta

I want to change first line of the HTTP header of my request, modifying the method and/or URL.

The (excellent) Tamperdata firefox plugin allows a developer to modify the headers of a request, but not the URL itself. This latter part is what I want to be able to do.

So something like...

GET http://foo.com/?foo=foo HTTP/1.1

... could become ...

GET http://bar.com/?bar=bar HTTP/1.1

For context, I need to tamper with (make correct) an erroneous request from Flash, to see if an error can be corrected by fixing the url.

Any ideas? Sounds like something that may need to be done on a proxy level. In which case, suggestions?

Foi útil?

Solução

Check out Charles Proxy (multiplatform) and/or Fiddler2 (Windows only) for more client-side solutions - both of these run as a proxy and can modify requests before they get sent out to the server.

If you have access to the webserver and it's running Apache, you can set up some rewrite rules that will modify the URL before it gets processed by the main HTTP engine.

Outras dicas

For those coming to this page from a search engine, I would also recommend the Burp Proxy suite: http://www.portswigger.net/burp/proxy.html

Although more specifically targeted towards security testing, it's still an invaluable tool.

If you're trying to intercept the HTTP packets and modify them on the way out, then Tamperdata may be route you want to take.

However, if you want minute control over these things, you'd be much better off simulating the entire browser session using a utility such as curl

Curl: http://curl.haxx.se/

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top