returns true if self is a class which was created by HTTP::Proxy
.
The address of the proxy server, if one is configured.
The port of the proxy server, if one is configured.
The username of the proxy server, if one is configured.
The password of the proxy server, if one is configured.
A recommended version for use with a ~> Requirement.
Return a progress reporter object chosen from the current verbosity.
Calculates relative path from oth to self.
require 'uri' uri = URI.parse('http://my.example.com/main.rbx?page=1') uri.route_from('http://my.example.com') #=> #<URI::Generic /main.rbx?page=1>
Returns a proxy URI
. The proxy URI
is obtained from environment variables such as http_proxy, ftp_proxy, no_proxy, etc. If there is no proper proxy, nil is returned.
If the optional parameter env
is specified, it is used instead of ENV
.
Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) are examined, too.
But http_proxy and HTTP_PROXY is treated specially under CGI
environment. It’s because HTTP_PROXY may be set by Proxy: header. So HTTP_PROXY is not used. http_proxy is not used too if the variable is case insensitive. CGI_HTTP_PROXY can be used instead.
Re-composes a prime factorization and returns the product.
pd
Array
of pairs of integers. The each internal pair consists of a prime number – a prime factor – and a natural number – an exponent.
For [[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]]
, it returns:
p_1**e_1 * p_2**e_2 * .... * p_n**e_n. Prime.int_from_prime_division([[2,2], [3,1]]) #=> 12
Return all reachable objects from root.
Returns true
if this process is stopped. This is only returned if the corresponding wait
call had the WUNTRACED
flag set.
Returns the number of the signal that caused stat to stop (or nil
if self is not stopped).
Prefix and suffix the program filename the same as ruby.
Set
Proxy-Authorization: header for “Basic” authorization.
Add the –http-proxy option
Simple wrapper for providing basic authentication for a proxied request. When called with a request req
, response res
, authentication realm
and block
the block will be called with a username
and password
. If the block returns true the request is allowed to continue, otherwise an HTTPStatus::ProxyAuthenticationRequired error is raised.