(url, obj)
| 5058 | |
| 5059 | |
| 5060 | function matchUrl(url, obj) { |
| 5061 | var match = URL_MATCH.exec(url); |
| 5062 | |
| 5063 | match = { |
| 5064 | protocol: match[1], |
| 5065 | host: match[3], |
| 5066 | port: int(match[5]) || DEFAULT_PORTS[match[1]] || null, |
| 5067 | path: match[6] || '/', |
| 5068 | search: match[8], |
| 5069 | hash: match[10] |
| 5070 | }; |
| 5071 | |
| 5072 | if (obj) { |
| 5073 | obj.$$protocol = match.protocol; |
| 5074 | obj.$$host = match.host; |
| 5075 | obj.$$port = match.port; |
| 5076 | } |
| 5077 | |
| 5078 | return match; |
| 5079 | } |
| 5080 | |
| 5081 | |
| 5082 | function composeProtocolHostPort(protocol, host, port) { |
no test coverage detected