Brian Candler wrote:
>     if uri.scheme == "https"
>       http.instance_eval { @ssl_context = 
> OpenSSL::SSL::SSLContext.new(:TLSv1) }
>       http.use_ssl = true
>     end
> 

Thanks a lot! It works for me.

>            if started? and @use_ssl != flag
>        if flag and not @ssl_context
> -        @ssl_context = OpenSSL::SSL::SSLContext.new
> +        @ssl_context = flag == true ? OpenSSL::SSL::SSLContext.new : 
> OpenSSL::SSL::SSLContext.new(flag)
>        end
Sorry, I do not understand the code segment.  What kind of improvement
do you mean?  I think the current usage is ok for me.
-- 
Posted via http://www.ruby-forum.com/.