Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for pathUnescape (0.18 sec)

  1. src/net/http/pattern.go

    	// Valid Go identifier.
    	for i, c := range s {
    		if !unicode.IsLetter(c) && c != '_' && (i == 0 || !unicode.IsDigit(c)) {
    			return false
    		}
    	}
    	return true
    }
    
    func pathUnescape(path string) string {
    	u, err := url.PathUnescape(path)
    	if err != nil {
    		// Invalidly escaped path; use the original
    		return path
    	}
    	return u
    }
    
    // relationship is a relationship between two patterns, p1 and p2.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 16:36:30 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"EscapeError", Type, 0},
    		{"InvalidHostError", Type, 6},
    		{"JoinPath", Func, 19},
    		{"Parse", Func, 0},
    		{"ParseQuery", Func, 0},
    		{"ParseRequestURI", Func, 0},
    		{"PathEscape", Func, 8},
    		{"PathUnescape", Func, 8},
    		{"QueryEscape", Func, 0},
    		{"QueryUnescape", Func, 0},
    		{"URL", Type, 0},
    		{"URL.ForceQuery", Field, 7},
    		{"URL.Fragment", Field, 0},
    		{"URL.Host", Field, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top