views:

18

answers:

2

I want to change first line of header, 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 (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?

A: 

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/

Jamie Wong
Tamperdata is almost exactly what I need, except that it doesn't allow modification of the URL or path of the request. Curl won't work for me, because the request needs to come from Flash. Thanks for comment: I will clarify question.
aaaidan
+1  A: 

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.

Marc Novakowski
Charles Proxy is _amazing_. If I was still doing much web dev, I'd _definitely_ buy it. Far out. Amazing piece of software. Incredibly useful, incredibly polished. And it solved my problem. Thank you, Marc.
aaaidan