Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information