Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Using Net::HTTP to proxy HTTPS
Landon Cox
2/20/2008 12:17:00 AM
As far as I can tell from my experimenting, there is no way to proxy
HTTPS requests using the Net::HTTP classes. My question is: can it be
done? And if so, how?
I've tried numerous variations, but the main gist of what I've tried is
this code fragment:
httpobj = Net::HTTP.new( host, port )
# this Proxy version below doesn't work to post to an HTTPS url through
a proxy even though
# it's supposed to have
# the same methods as Net::HTTP, errors with a use_ssl is not a method
# httpobj = Net::HTTP.Proxy( @proxy_host, @proxy_port, @proxy_user,
@proxy_password )
httpobj.use_ssl = true
httpobj.start do | http |
request = Net::HTTP::Post.new(path)
request.set_form_data({ "scan[scan_results]" => "#{results}" } )
response = http.request(request)
end
Proxying normal HTTP requests works fine. Using HTTPS with no proxying
works fine, but
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Using Net::HTTP to proxy HTTPS
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password