MCPcopy Create free account
hub / github.com/zalando/skipper / PatchHost

Function PatchHost

rfc/patchhost.go:8–11  ·  view source on GitHub ↗

PatchHost returns a host string without trailing dot. For details see also the discussion in https://lists.w3.org/Archives/Public/ietf-http-wg/2016JanMar/0430.html.

(host string)

Source from the content-addressed store, hash-verified

6// see also the discussion in
7// https://lists.w3.org/Archives/Public/ietf-http-wg/2016JanMar/0430.html.
8func PatchHost(host string) string {
9 host = strings.ReplaceAll(host, ".:", ":")
10 return strings.TrimSuffix(host, ".")
11}

Callers 2

RequestMethod · 0.92
TestPatchHostFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestPatchHostFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…