MCPcopy
hub / github.com/valyala/fasthttp / TestResponseHeaderMultiLinePanicked

Function TestResponseHeaderMultiLinePanicked

header_test.go:284–293  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

282}
283
284func TestResponseHeaderMultiLinePanicked(t *testing.T) {
285 t.Parallel()
286
287 // Input generated by fuzz testing that caused the parser to panic.
288 s, _ := base64.StdEncoding.DecodeString("aAEAIDoKKDoKICA6CgkKCiA6CiA6CgkpCiA6CiA6CiA6Cig6CiAgOgoJCgogOgogOgoJKQogOgogOgogOgogOgogOgoJOg86CiA6CiA6Cig6CiAyCg==")
289 header := new(RequestHeader)
290 if _, err := header.parse(s); err == nil {
291 t.Error("expected error, got <nil>")
292 }
293}
294
295func TestRequestHeaderLooseBackslashR(t *testing.T) {
296 t.Parallel()

Callers

nothing calls this directly

Calls 2

parseMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…