Tag Archives: HTTP

Debugging and developing using Firefox

So I need to trap and look at the traffic going over HTTP and knowing that Firefox is the browser to use with all it different plugins it makes sense to download the latest version of Firefox and see what I can plug in to it.

What I like about Firefox is it is so easy to install plugins, just click restart Firefox and you’re done.

So what I need to do is trap, monitor and post HTTP requests using XML, so what plug in am I going to use?

First one is FireBug every good developer and bad developer, even hackers will be using FireBug.

Next I need to monitor what is happening and I found Tamper Data which monitors ongoing requests, and more importantly monitors and posts and gets in the back ground.

Okay now the more tricky issue of being about to POST or GET using HTTP, I settled for Poster a great plug in for all the REST requests and perfect for what I am looking for.

So to summerise here is a list of what I have downloaded:

So I’m off, if I get any problems with them I’mm report them directly on this blog with comments so if you see no comments all is good.

HTTP Sniffer

Why can I never seem to remember the name of software I have used before?  Perhaps that is one reason why I try to keep my blog up to date, as I use it as a brain dump of tasks I have been working on, so when my memory fails me I can also revert to my Blog and perform a search or look at the archive and find what I as working on say 2 years ago.  I know softare moves on, but I always find some software no matter how old it is, just can’t be beaten.

One piece of software that I always go back to is Fiddler, HTTP Debugging Proxy which logs all HTTP traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP Traffic, set breakpoints, and “fiddle” with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

Of course if you are using Visual Studio and the in built web server, which works without going through the Proxy, at it is running locally.

IE7 and the .NET Framework are hardcoded not to send requests for Localhost through any proxies, and as a proxy, Fiddler will not receive such traffic.  Here is a snippet from fiddler web site which works very well.

The workaround is to use your machine name as the hostname instead of Localhost or 127.0.0.1. So, for instance, rather than hitting http://localhost:8081/mytestpage/, instead visit http://machinename:8081/mytestpage/. 

…Or, if you’re using Fiddler v2.1.8 or later, just use http://ipv4.fiddler to hit localhost on the IPv4 adapter, or use http://ipv6.fiddler to hit localhost on the IPv6 adapter.  This works especially well with the Visual Studio test webserver (codename: Cassini) because the test server only listens on the IPv4 loopback adapter.

Lastly, you could Customize your Rules file like so:

static function OnBeforeRequest(oSession:Fiddler.Session){

  if (oSession.HostnameIs(“MYAPP”)) { oSession.host = “127.0.0.1:8081”; }

}

…and then just hit http://myapp, which will act as an alias for 127.0.0.1:8081.