Howdy,
I try to auth against a HTTP proxy for hours now. What's going wrong
here?
#!/usr/bin/env ruby
require 'eventmachine'
require 'em-http-request'
EM::run do
connection_opts = {:proxy => {:host => '
proxy.example.com', :port
=> 3128 }}
request_opts = {:proxy => {:authorization => ['jdoe',
'secretpw']}}
req = EM::HttpRequest.new('
http://www.example.com',
connection_opts).get request_opts
req.callback do |resp|
puts resp.response_header.status
end
end
I always get a 407 (Access denied). Same proxy login data work in
browsers (Firefox, Chrome etc.) like a charm. The proxy is a Squid
3.1.10. Totally confused about this behaviour. By the way: event
machine-1.0.0.beta.4, em-http-request-1.0.2.
Cheerio,
Chris