Internal

internal/redirectbody

import "github.com/gofiber/fiber/v3/internal/redirectbody"

Package redirectbody turns a request into one without a body, for the hop a redirect sends it on as a GET: the client and the proxy follow redirects each with a loop of their own, and what goes with the body is decided here for both.

Functions

func Drop(req *fasthttp.Request) bool

Source: internal/redirectbody/redirectbody.go:19

Drop removes the body of req and the fields that frame or describe it: Content-Length, Transfer-Encoding and the trailer section signal one (RFC 9112), Content-Type and Content-Encoding describe one no longer there, and Expect asks for one (RFC 9110 §10.1.1), which a strict target answers with 417 instead of serving the bodyless follow-up. It reports false, leaving req as it is, when the trailer section announces more names than fieldname.MaxTrailers.