removeEmptyPort strips the empty port in ":port" to "" as mandated by RFC 3986 Section 6.2.3.
(host string)
| 18 | // removeEmptyPort strips the empty port in ":port" to "" |
| 19 | // as mandated by RFC 3986 Section 6.2.3. |
| 20 | func removeEmptyPort(host string) string { |
| 21 | if hasPort(host) { |
| 22 | return strings.TrimSuffix(host, ":") |
| 23 | } |
| 24 | return host |
| 25 | } |
| 26 | |
| 27 | func isNotToken(r rune) bool { |
| 28 | return !httpguts.IsTokenRune(r) |
no test coverage detected
searching dependent graphs…