Class: RProxy::HttpProxyParser
- Inherits:
-
Object
- Object
- RProxy::HttpProxyParser
- Defined in:
- lib/r_proxy/http_proxy_parser.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(usage_manager) ⇒ HttpProxyParser
constructor
A new instance of HttpProxyParser.
- #parse(data, need_auth) ⇒ Object
Constructor Details
#initialize(usage_manager) ⇒ HttpProxyParser
Returns a new instance of HttpProxyParser.
8 9 10 11 |
# File 'lib/r_proxy/http_proxy_parser.rb', line 8 def initialize(usage_manager) @usage_manager = usage_manager @max_connection_size = 4 * 1024 end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
6 7 8 |
# File 'lib/r_proxy/http_proxy_parser.rb', line 6 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
6 7 8 |
# File 'lib/r_proxy/http_proxy_parser.rb', line 6 def username @username end |
Instance Method Details
#parse(data, need_auth) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/r_proxy/http_proxy_parser.rb', line 13 def parse(data, need_auth) parse_connect_request(data) remain = 0 remain = auth_user if need_auth [@schema.host, @schema.port, remain] end |