Home / Function/ Test_Ctx_Set_Splitter() — fiber Function Reference

Test_Ctx_Set_Splitter() — fiber Function Reference

Architecture documentation for the Test_Ctx_Set_Splitter() function in ctx_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  fa769f13_5246_a75b_1bea_a3e569cabf9d["Test_Ctx_Set_Splitter()"]
  7b3d4933_5ae3_f84d_ff6d_0cb34e268026["ctx_test.go"]
  fa769f13_5246_a75b_1bea_a3e569cabf9d -->|defined in| 7b3d4933_5ae3_f84d_ff6d_0cb34e268026
  style fa769f13_5246_a75b_1bea_a3e569cabf9d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

ctx_test.go lines 7301–7313

func Test_Ctx_Set_Splitter(t *testing.T) {
	t.Parallel()
	app := New()
	c := app.AcquireCtx(&fasthttp.RequestCtx{})

	c.Set("Location", "foo\r\nSet-Cookie:%20SESSIONID=MaliciousValue\r\n")
	h := string(c.Response().Header.Peek("Location"))
	require.NotContains(t, h, "\r\n")

	c.Set("Location", "foo\nSet-Cookie:%20SESSIONID=MaliciousValue\n")
	h = string(c.Response().Header.Peek("Location"))
	require.NotContains(t, h, "\n")
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_Ctx_Set_Splitter() do?
Test_Ctx_Set_Splitter() is a function in the fiber codebase, defined in ctx_test.go.
Where is Test_Ctx_Set_Splitter() defined?
Test_Ctx_Set_Splitter() is defined in ctx_test.go at line 7301.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free