You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some services require that when you specify a proxy address, it includes the URI protocol (http), while some libraries handle it for you. To better accommodate abstractions, this is desirable that it adds http when needed -- but only if it's needed.
Mechanize is an example that handles it for you, but does so without checking what was passed in, and can create a hard-to-find error, especially if you don't see the value set_proxy returns.
When you dig into the source, you come across this note:
##
# Sets the proxy address, port, user, and password +addr+ should be a host,
# with no "http://", +port+ may be a port number, service name or port
# number string.
Some services require that when you specify a proxy address, it includes the URI protocol (http), while some libraries handle it for you. To better accommodate abstractions, this is desirable that it adds
http
when needed -- but only if it's needed.Mechanize is an example that handles it for you, but does so without checking what was passed in, and can create a hard-to-find error, especially if you don't see the value set_proxy returns.
When you dig into the source, you come across this note:
It handles the address with this line.
Is there a reason that
proxy_uri = URI "http://#{addr}"
couldn't or shouldn't be fleshed out better to check for%r(^https?//)
The text was updated successfully, but these errors were encountered: