byterange

package
v3.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package byterange adds the Range and If-Range rules (RFC 9110 §13.1.5, §14.2) that fasthttp's file server lacks: it takes only a lower-case "bytes" unit, applies Range to HEAD and matches If-Range by date alone. It is shared by Ctx.SendFile and the static middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

Wrap returns handler, a fasthttp file server with byte ranges enabled, with the Range field handled as RFC 9110 asks. The field is ignored, and the whole file sent, for a non-GET request, a unit other than "bytes", several ranges, or an If-Range that does not match the response's ETag (when the caller set one) or its Last-Modified.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL