Home / Function/ Test_Compress_Skip_Range_Vary_Similar_Substring() — fiber Function Reference

Test_Compress_Skip_Range_Vary_Similar_Substring() — fiber Function Reference

Architecture documentation for the Test_Compress_Skip_Range_Vary_Similar_Substring() function in compress_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  c310f5b6_0593_bd5f_f391_eb77842b40f8["Test_Compress_Skip_Range_Vary_Similar_Substring()"]
  d6d930a5_a4c6_37a5_5df5_4b38486d6fe6["compress_test.go"]
  c310f5b6_0593_bd5f_f391_eb77842b40f8 -->|defined in| d6d930a5_a4c6_37a5_5df5_4b38486d6fe6
  style c310f5b6_0593_bd5f_f391_eb77842b40f8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/compress/compress_test.go lines 558–577

func Test_Compress_Skip_Range_Vary_Similar_Substring(t *testing.T) {
	t.Parallel()
	app := fiber.New()

	app.Use(New())

	app.Get("/", func(c fiber.Ctx) error {
		c.Set(fiber.HeaderVary, "Accept-Encoding2")
		return c.SendString("hello")
	})

	req := httptest.NewRequest(fiber.MethodGet, "/", http.NoBody)
	req.Header.Set("Accept-Encoding", "gzip")
	req.Header.Set("Range", "bytes=0-1")

	resp, err := app.Test(req, testConfig)
	require.NoError(t, err, "app.Test(req)")
	require.Empty(t, resp.Header.Get(fiber.HeaderContentEncoding))
	require.Equal(t, "Accept-Encoding2, Accept-Encoding", resp.Header.Get(fiber.HeaderVary))
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Compress_Skip_Range_Vary_Similar_Substring() do?
Test_Compress_Skip_Range_Vary_Similar_Substring() is a function in the fiber codebase, defined in middleware/compress/compress_test.go.
Where is Test_Compress_Skip_Range_Vary_Similar_Substring() defined?
Test_Compress_Skip_Range_Vary_Similar_Substring() is defined in middleware/compress/compress_test.go at line 558.

Analyze Your Own Codebase

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

Try Supermodel Free