Internal

internal/unsent

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

Package unsent marks a request whose connection was closed without a response, so middleware that stores or counts responses can tell.

Functions

func Is(ctx *fasthttp.RequestCtx) bool

Source: internal/unsent/unsent.go:19

Is reports whether ctx may be sent no response: Mark flagged it, or the connection was hijacked, as the adaptor also does for an aborted net/http handler. fasthttp sends the response before a hijack handler unless HijackSetNoResponse(true) was set, which it does not report, so every hijack counts.

func Mark(ctx *fasthttp.RequestCtx)

Source: internal/unsent/unsent.go:12

Mark flags ctx as a request that is sent no response.