httpwire

package
v8.0.47 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package httpwire contains narrowly scoped HTTP/1.1 wire helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlushResponse added in v8.0.14

func FlushResponse(w http.ResponseWriter) error

FlushResponse prefers error-aware flushing and preserves legacy middleware. Only Gin's raw void Flush is bypassed so transport errors remain observable.

func NewOrderedRequestConn

func NewOrderedRequestConn(conn net.Conn, order RequestHeaderOrder) net.Conn

NewOrderedRequestConn wraps conn and rewrites HTTP/1.1 request-header order and matches header casing to the desired order list. Request lines, unlisted header casing and values, and body bytes remain intact.

Types

type RequestHeaderOrder

type RequestHeaderOrder func(method, requestTarget string) []string

RequestHeaderOrder returns the desired header-name order for one HTTP/1.1 request. Names are compared case-insensitively. Headers omitted from the returned list retain their original relative order after the listed headers.

Jump to

Keyboard shortcuts

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