- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for sanitizeCookiePath (0.17 sec)
-
src/net/http/cookie.go
b.WriteString(c.Name) b.WriteRune('=') b.WriteString(sanitizeCookieValue(c.Value, c.Quoted)) if len(c.Path) > 0 { b.WriteString("; Path=") b.WriteString(sanitizeCookiePath(c.Path)) } if len(c.Domain) > 0 { if validCookieDomain(c.Domain) { // A c.Domain containing illegal characters is not // sanitized but simply dropped which turns the cookie
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:33:05 UTC 2024 - 13.9K bytes - Viewed (0) -
src/net/http/cookie_test.go
{"/path", "/path"}, {"/path with space/", "/path with space/"}, {"/just;no;semicolon\x00orstuff/", "/justnosemicolonorstuff/"}, } for _, tt := range tests { if got := sanitizeCookiePath(tt.in); got != tt.want { t.Errorf("sanitizeCookiePath(%q) = %q; want %q", tt.in, got, tt.want) } } if got, sub := logbuf.String(), "dropping invalid bytes"; !strings.Contains(got, sub) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:33:05 UTC 2024 - 26.2K bytes - Viewed (0)