Method: HttpVanilli::Util.strip_default_port_from_uri
- Defined in:
- lib/http_vanilli/util.rb
.strip_default_port_from_uri(uri) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/http_vanilli/util.rb', line 14 def self.strip_default_port_from_uri(uri) case uri when %r{^http://} then uri.sub(%r{:80(/|$)}, '\1') when %r{^https://} then uri.sub(%r{:443(/|$)}, '\1') else uri end end |