MCPcopy Index your code
hub / github.com/zalando/skipper / unescape

Function unescape

rfc/patchpath.go:19–44  ·  view source on GitHub ↗

https://tools.ietf.org/html/rfc3986#section-2.2

(seq []byte)

Source from the content-addressed store, hash-verified

17
18// https://tools.ietf.org/html/rfc3986#section-2.2
19func unescape(seq []byte) (byte, bool) {
20 switch string(seq) {
21 case "%3B", "%3b":
22 return semicolon, true
23 case "%2F", "%2f":
24 return slash, true
25 case "%3F", "%3f":
26 return questionMark, true
27 case "%3A", "%3a":
28 return colon, true
29 case "%40":
30 return at, true
31 case "%26":
32 return and, true
33 case "%3D", "%3d":
34 return eq, true
35 case "%2B", "%2b":
36 return plus, true
37 case "%24":
38 return dollar, true
39 case "%2C", "%2c":
40 return comma, true
41 default:
42 return 0, false
43 }
44}
45
46// PatchPath attempts to patch a request path based on an interpretation of the standards
47// RFC 2616 and RFC 3986 where the reserved characters should not be unescaped. Currently

Callers 1

PatchPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…