fasthttp @ v1.81.0
integrity
- size
- 705.7 KiB
- downloaded
- last checked
- overlays
- go
- detected
- go module github.com/valyala/fasthttp
release notes
v1.81.0 tightens request-header termination, fixes content-type handling for encoded responses in fasthttpadaptor, and adds APIs for inspecting hijack behavior and exchanging headers without copying their contents.
Security fixes and hardening
- Nonempty request header blocks must end with CRLFCRLF. The parser validates the terminator at the first blank line instead of allowing a later CRLFCRLF sequence to make a malformed boundary appear valid. This keeps request boundaries consistent across fragmented reads and pipelined requests. Bare LF line endings within the block remain accepted when the block itself ends correctly. #2610
Features
- Middleware can inspect whether hijacking suppresses the response.
RequestCtx.HijackNoResponse()returns the setting established byHijackSetNoResponse. Combined withHijacked(), it lets middleware distinguish a connection takeover without an HTTP response from one where fasthttp writes the response first. The setting only takes effect when hijacking is requested; existing hijack behavior is unchanged. #2614 - Headers can be exchanged without copying their contents.
RequestHeader.SwapandResponseHeader.Swapexchange contents, buffers, and settings, including cookies, trailers, and header normalization. Previously obtained byte slices continue to reference the same buffers, which belong to the other header after the swap. This avoids copying header data when moving it between requests or responses. #2615
HTTP compatibility
- Adapted handlers no longer infer a content type from encoded bytes. When a
net/httphandler supplies a nonemptyContent-Encodingbut noContent-Type,fasthttpadaptorskips content sniffing and suppresses fasthttp's default content type. A gzip-compressed response is therefore no longer incorrectly labeledapplication/x-gzipbased on its compressed bytes. Both buffered and flushed responses follow this behavior. #2602
What's Changed
Security and hardening
- Require CRLFCRLF at the end of nonempty request header blocks by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2610
Features
- feat: add RequestCtx.HijackNoResponse by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2614
- feat: add Swap to exchange two headers without copying by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2615
Fixes
- fix(fasthttpadaptor): do not sniff the Content-Type of an encoded body by @ruziba3vich in https://github.com/valyala/fasthttp/pull/2602
Dependency updates
- chore(deps): bump golang.org/x/net from 0.62.0 to 0.63.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2609
- chore(deps): bump github.com/klauspost/compress from 1.20.4 to 1.20.5 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2608
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.80.0...v1.81.0
download
unix · zip
curl -fL -o v1.81.0.zip https://ratatoskr.space/pkg/fasthttp/v1.81.0.zip
printf '%s %s\n' 'd890b1639b43f5b1bab7432a2d9170e9366bc67a98699be74e35dcf6f6feafda' 'v1.81.0.zip' | sha256sum -c -
windows · zip
$url = "https://ratatoskr.space/pkg/fasthttp/v1.81.0.zip"
$out = "v1.81.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "d890b1639b43f5b1bab7432a2d9170e9366bc67a98699be74e35dcf6f6feafda") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1.81.0.tar.gz https://ratatoskr.space/pkg/fasthttp/v1.81.0.tar.gz
printf '%s %s\n' '8831c4c7ac82e56186715081d3bc6fc5428e54357f3a6d7889b49ba2f11b0bd2' 'v1.81.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "https://ratatoskr.space/pkg/fasthttp/v1.81.0.tar.gz"
$out = "v1.81.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "8831c4c7ac82e56186715081d3bc6fc5428e54357f3a6d7889b49ba2f11b0bd2") { throw "sha256 mismatch" }
download via yggdrasil mesh
unix · zip
curl -fL -o v1.81.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/fasthttp/v1.81.0.zip
printf '%s %s\n' 'd890b1639b43f5b1bab7432a2d9170e9366bc67a98699be74e35dcf6f6feafda' 'v1.81.0.zip' | sha256sum -c -
windows · zip
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/fasthttp/v1.81.0.zip"
$out = "v1.81.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "d890b1639b43f5b1bab7432a2d9170e9366bc67a98699be74e35dcf6f6feafda") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1.81.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/fasthttp/v1.81.0.tar.gz
printf '%s %s\n' '8831c4c7ac82e56186715081d3bc6fc5428e54357f3a6d7889b49ba2f11b0bd2' 'v1.81.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/fasthttp/v1.81.0.tar.gz"
$out = "v1.81.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "8831c4c7ac82e56186715081d3bc6fc5428e54357f3a6d7889b49ba2f11b0bd2") { throw "sha256 mismatch" }
| artifact | format | size | hashes |
|---|---|---|---|
| v1.81.0.zip | zip | 714.2 KiB |
blake3-24 120f6f56a584a89b21ff92c2a01508aac37d37f265e66806
sha256 d890b1639b43f5b1bab7432a2d9170e9366bc67a98699be74e35dcf6f6feafda
sha1 2fb0537af1ad057f2cacb0bc002a979d82d8f9c9
|
| v1.81.0.tar.gz | tar.gz | 618.6 KiB |
blake3-24 1d18da15dd4581321dadcbc5df5672d0d0070317ab63a9e2
sha256 8831c4c7ac82e56186715081d3bc6fc5428e54357f3a6d7889b49ba2f11b0bd2
sha1 dd7bbdfaf2a7611873077f6cba7f47b44c25873e
|
go module archive
module zip with the module path rewritten to this mirror; fetched by go get through the
GOPROXY route
| artifact | format | size | hashes |
|---|---|---|---|
| v1.81.0.zip | zip | 719.2 KiB |
blake3-24 68784c5a85a19608a439b4c082ab3b7c3eaed678bc4e5822
sha256 d5c64251dbe8559b53e3657ed0230ad974d4a4c9865b2c39ba56f48dcf02d4cb
sha1 bdaab3f8660421eb926fe7694a4bba37a9a15cc1
|
install
bazel
http_archive(
name = "fasthttp",
urls = ["https://ratatoskr.space/pkg/fasthttp/v1.81.0.tar.gz"],
integrity = "sha256-iDHEx6yC5WGGcVCB07xvxUKOVDV/Om14ibSbovEbC9I=",
strip_prefix = "fasthttp-v1.81.0",
)
zig
.url = "https://ratatoskr.space/pkg/fasthttp/v1.81.0.tar.gz",
go
GOPROXY=https://ratatoskr.space GOSUMDB=off go get ratatoskr.space/pkg/fasthttp@v1.81.0
install via yggdrasil mesh
bazel
http_archive(
name = "fasthttp",
urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/fasthttp/v1.81.0.tar.gz"],
integrity = "sha256-iDHEx6yC5WGGcVCB07xvxUKOVDV/Om14ibSbovEbC9I=",
strip_prefix = "fasthttp-v1.81.0",
)
zig
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/fasthttp/v1.81.0.tar.gz",
go
GOPROXY=http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg GOSUMDB=off GOINSECURE=14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/* go get 14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/fasthttp@v1.81.0