From: GOTO Kentaro Date: 2008-01-23T22:22:11+09:00 Subject: Re: HTTP Proxy instruction? On Jan 23, 2008 1:48 AM, Ben Weeks wrote: > I'm looking to create a proxy that will scrape all my http headers and > post them to stdout. My searches have been vacant on this topic, does > anybody know of any good tutorials out there? Try this one-liner, % ruby -r webrick/httpproxy -e 's = WEBrick::HTTPProxyServer.new(:Port => 9999, :RequestCallback => Proc.new{|req,res| puts req.request_line, req.raw_header}); trap("INT"){s.shutdown}; s.start' webrick/httprequest.rb defines APIs of a req object. HTH Gotoken