Test_Ctx_Cookie_Invalid() — fiber Function Reference
Architecture documentation for the Test_Ctx_Cookie_Invalid() function in ctx_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD ec2ebfc2_7e19_616a_dad4_08af6dd4ce35["Test_Ctx_Cookie_Invalid()"] 7b3d4933_5ae3_f84d_ff6d_0cb34e268026["ctx_test.go"] ec2ebfc2_7e19_616a_dad4_08af6dd4ce35 -->|defined in| 7b3d4933_5ae3_f84d_ff6d_0cb34e268026 style ec2ebfc2_7e19_616a_dad4_08af6dd4ce35 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
ctx_test.go lines 1469–1492
func Test_Ctx_Cookie_Invalid(t *testing.T) {
t.Parallel()
app := New()
cases := []*Cookie{
{Name: "", Value: "a"}, // empty name
{Name: "foo bar", Value: "a"}, // invalid char in name
{Name: "n", Value: "bad\nval"}, // invalid value byte
{Name: "d", Value: "b", Domain: "in valid"}, // invalid domain spaces
{Name: "d", Value: "b", Domain: "example..com"}, // invalid domain dots
{Name: "i", Value: "b", Domain: "2001:db8::1"}, // ipv6 not allowed
{Name: "p", Value: "b", Path: "\x00"}, // invalid path byte
{Name: "e", Value: "b", Expires: time.Date(1500, 1, 1, 0, 0, 0, 0, time.UTC)}, // invalid expires
// Note: Partitioned without Secure is auto-fixed (Secure=true set automatically per CHIPS spec)
}
for _, invalid := range cases {
c := app.AcquireCtx(&fasthttp.RequestCtx{})
c.Res().Cookie(invalid)
require.Empty(t, c.Res().Get(HeaderSetCookie))
c.Response().Header.Reset()
app.ReleaseCtx(c)
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Ctx_Cookie_Invalid() do?
Test_Ctx_Cookie_Invalid() is a function in the fiber codebase, defined in ctx_test.go.
Where is Test_Ctx_Cookie_Invalid() defined?
Test_Ctx_Cookie_Invalid() is defined in ctx_test.go at line 1469.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free