Index: graph.rb
===================================================================
--- graph.rb (revision 4)
+++ graph.rb (working copy)
@@ -48,7 +48,15 @@
req = ::Net::HTTP::Post.new(url.path, headers)
req.form_data = params
req.basic_auth url.user, url.password if url.user
- ::Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }
+
+ proxy_host, proxy_port = nil, 8080
+ if ENV['HTTP_PROXY'] then
+ proxy_host, proxy_port = ENV['HTTP_PROXY'].split(/:/)
+ proxy_port = proxy_port.to_i
+ end
+ ::Net::HTTP::Proxy(proxy_host, proxy_port).start(url.host, url.port) {|http|
+ http.request(req)
+ }
end
def wsse(username, password) |