Skip to content

Bump github.com/valyala/fasthttp from 1.76.0 to 1.81.0 - #80

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/valyala/fasthttp-1.81.0
Open

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/go_modules/github.com/valyala/fasthttp-1.81.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 2, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/valyala/fasthttp from 1.76.0 to 1.81.0.

Release notes

Sourced from github.com/valyala/fasthttp's releases.

v1.81.0

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 by HijackSetNoResponse. Combined with Hijacked(), 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.Swap and ResponseHeader.Swap exchange 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/http handler supplies a nonempty Content-Encoding but no Content-Type, fasthttpadaptor skips content sniffing and suppresses fasthttp's default content type. A gzip-compressed response is therefore no longer incorrectly labeled application/x-gzip based on its compressed bytes. Both buffered and flushed responses follow this behavior. #2602

What's Changed

Security and hardening

Features

Fixes

Dependency updates

Full Changelog: valyala/fasthttp@v1.80.0...v1.81.0

v1.80.0

v1.80.0 fixes client connection desynchronization when skipping response bodies and preserves cache variation headers during compression. It also adds helper APIs for downstream frameworks, makes parser errors matchable, and improves redirects, compression negotiation, and repeated-header handling.

Security fixes and hardening

  • Skipping a response body no longer desynchronizes later requests. Reusing a Response after HEAD no longer makes subsequent requests skip their bodies. When a caller explicitly skips a potentially present body, Client and HostClient close the connection instead of pooling it with unread bytes. PipelineClient reads and discards the body so the next pipelined response starts at the correct boundary. The caller's SkipBody setting is preserved. #2533
  • Compression preserves every Vary line. Adding Accept-Encoding no longer removes later Vary fields, such as Vary: Cookie. This fixes a regression that could let a shared cache reuse a response without considering all of its original variation criteria. Both CompressHandler and compressed static-file serving are covered. #2598
  • Unsigned float parsing rejects non-finite values and negative zero. ParseUfloat and the argument getters that use it now reject NaN, infinity, and -0. Finite formats accepted by strconv.ParseFloat, including a leading +, digit separators, and hexadecimal floats, remain supported. #2546

Features

  • Bounded decompression helpers work directly on byte slices. AppendGunzipBytesWithLimit, AppendInflateBytesWithLimit, AppendUnbrotliBytesWithLimit, and AppendUnzstdBytesWithLimit append decoded data while enforcing a limit on newly decoded bytes. Existing data in the destination does not count toward the limit. Exceeding the limit returns ErrBodyTooLarge; a non-positive limit leaves output unlimited. The zstd helper also limits decoder window size when a positive limit is supplied. #2520

... (truncated)

Commits
  • 62fa035 feat: add Swap to exchange two headers without copying (#2615)
  • 4630f2d feat: add RequestCtx.HijackNoResponse (#2614)
  • b53cca2 Require CRLFCRLF at the end of nonempty request header blocks (#2610)
  • 2b73899 fix(fasthttpadaptor): do not sniff the Content-Type of an encoded body (#2602)
  • b8b1ff6 chore(deps): bump github.com/klauspost/compress from 1.20.4 to 1.20.5 (#2608)
  • ac90df6 chore(deps): bump golang.org/x/net from 0.62.0 to 0.63.0 (#2609)
  • b0796cf feat: make the unsupported method and unknown transfer coding errors matchabl...
  • e895c9d fix(header): 按媒体类型的大小写无关规则启用压缩 (#2606)
  • 09b0c15 docs: explain fragmented input to Request.Read (#2605)
  • c272d38 docs: clarify retry callback eligibility (#2604)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.76.0 to 1.81.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](valyala/fasthttp@v1.76.0...v1.81.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-version: 1.81.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Dec 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants