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
Move the host request parsing to a separate method. (#85)
Allows for someone to override the parsing to accommodate "alternatives".
One could write the following to allow underscores in host names.
require 'webrick/httprequest'
module WEBrick
class HTTPRequest
private
def parse_host_request_line(host, scheme)
uri = URI.parse("#{scheme}://#{host}")
[uri.host, uri.port]
end
end
end
Also adding the "o" option to the regex so the regex is only built once.
0 commit comments