-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using with mechanize #2
Comments
I get the same error when using just |
Looks like You can work around this by re-setting the Net::HTTP::Persistent::SSLReuse.http_logger = Logger.new(STDOUT) You also modify the options on that class: Net::HTTP::Persistent::SSLReuse.http_logger_options = {:body => true, :verbose => true, :trace => true} Unfortunately the class in question has a big warning comment on the top: # DO NOT DEPEND UPON THIS CLASS
#
# This class is an implementation detail and is subject to change or removal
# at any time. lib/net/http/persistent/ssl_reuse.rb It seems a little weird that this subclass comes into play even when you're not using SSL. Perhaps @drbrain has a comment on that. Another thing to consider would be if there's a way to implement this that doesn't rely on class variables. Either way, the workaround does indeed work around for now. |
My goal is to have Net::HTTP in ruby automatically reuse SSL sessions to speed up reconnection to SSL servers, so I don't want users or library implementers to depend on the use of this class. I have hooks in net-http-persistent to disable the subclass for tools like these (originally added for mocking libraries), so I can add one for net-http-spy as well. |
An error is raised when using the spy on mechanize:
Works fine without the spy.
The text was updated successfully, but these errors were encountered: