Dan K. wrote:
As part of debugging WWW::Mechanize, I realized that the best way to
compare what my browser is doing to what mechanize is doing would be to
compare their HTTP transactions incoming and outgoing. What I want is
an HTTP proxy that can record the transactions and also supports SSL.
MouseHole is a scriptable proxy. http://mousehole.rubyforge.org/
A script to record traffic would a cinch. Basically,
Download MouseHole from the above link. Instructions for running it
are there as well.
Add a script named `proxyrecord.user.rb’ to your
name "Proxy Record"
description "Records all traffic, very snoopy."
rewrite do |req, res|
# store contents of `req' and `res' in the database or a
# log file or something
In your browser, setup MouseHole as your proxy
Visit http://127.0.0.1:37004/ and activate the Proxy Record script by
checking its box.
As for SSL, I don’t think proxies can actually intercept unencrypted
SSL. It uses the CONNECT method.