- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for pathUnescape (0.39 sec)
-
src/net/http/routing_tree.go
if c := n.multiChild; c != nil { // Don't record a match for a nameless wildcard (which arises from a // trailing slash in the pattern). if c.pattern.lastSegment().s != "" { matches = append(matches, pathUnescape(path[1:])) // remove initial slash } return c, matches } return nil, nil } // firstSegment splits path into its first segment, and the rest. // The path must begin with "/".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 30 15:43:24 UTC 2024 - 7.5K bytes - Viewed (0) -
src/net/url/url_test.go
for _, tt := range pathEscapeTests { actual := PathEscape(tt.in) if tt.out != actual { t.Errorf("PathEscape(%q) = %q, want %q", tt.in, actual, tt.out) } // for bonus points, verify that escape:unescape is an identity. roundtrip, err := PathUnescape(actual) if roundtrip != tt.in || err != nil { t.Errorf("PathUnescape(%q) = %q, %s; want %q, %s", actual, roundtrip, err, tt.in, "[no error]")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:52:38 UTC 2024 - 52.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go
if len(headerValue) > 0 { ret = append(ret, headerValue) } } } return ret } func unescapeExtraKey(encodedKey string) string { key, err := url.PathUnescape(encodedKey) // Decode %-encoded bytes. if err != nil { return encodedKey // Always record extra strings, even if malformed/unencoded. } return key }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 18:19:54 UTC 2024 - 6.1K bytes - Viewed (0) -
tests/integration/security/normalization_test.go
} var percentEncodedCases []expect for i := 1; i <= 0xff; i++ { input := fmt.Sprintf("/admin%%%.2x", i) output := input if supportedPercentEncode(i) { var err error output, err = url.PathUnescape(input) switch i { case 0x5c: output = strings.ReplaceAll(output, `\`, `/`) case 0x7e: output = strings.ReplaceAll(output, `%7e`, `~`) } if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 22:02:59 UTC 2024 - 7.7K bytes - Viewed (0) -
cmd/utils.go
ep = path.Clean(ep) ep += slashSeparator } else { ep = path.Clean(ep) } ep = ep[1:] } return ep } // unescapeGeneric is similar to url.PathUnescape or url.QueryUnescape // depending on input, additionally also handles situations such as // `//` are normalized as `/`, also removes any `/` prefix before // returning.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jun 05 22:00:34 UTC 2024 - 31.9K bytes - Viewed (0) -
src/net/url/url.go
} // PathUnescape does the inverse transformation of [PathEscape], // converting each 3-byte encoded substring of the form "%AB" into the // hex-decoded byte 0xAB. It returns an error if any % is not followed // by two hexadecimal digits. // // PathUnescape is identical to [QueryUnescape] except that it does not // unescape '+' to ' ' (space). func PathUnescape(s string) (string, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 36.1K bytes - Viewed (0)