EM-Synchrony & proxy authorization

19 views
Skip to first unread message

Christoph Pilka

unread,
Apr 25, 2012, 9:26:43 PM4/25/12
to EventMachine
Hi folks,

I'm trying to authorize me when connecting to a proxy but it fails, I
get 407 frmo the proxy provider:

#!/usr/bin/env ruby

require 'em-synchrony'
require 'em-synchrony/em-http'

EM.synchrony do
url = "http://www.example.com"
connection_options = { :proxy => { :host => '10.11.12.13', :port =>
3128 } }
request_options = { :proxy => { :authorization => [ 'jdoe',
'mysecretpw' ] } }
request = EM::HttpRequest.new(url, connection_options).aget
request_options
request.callback do |response|
puts response.response_header.status
end
end

The login data work fine e.g. adding the same proxy to firefox, so no
credential issues. Is the syntax above correct? I'm running em-
synchrony 1.0.1.

Cheerio,
Chris
Reply all
Reply to author
Forward
0 new messages