chore: bump github.com/valyala/fasthttp from 1.74.0 to 1.75.0 (#31049)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.74.0 to 1.75.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/valyala/fasthttp/releases">github.com/valyala/fasthttp's releases</a>.</em></p> <blockquote> <h2>v1.75.0</h2> <p><code>v1.75.0</code> improves HTTP parsing and serialization, URI processing, cached file serving, and client connection handling. It also fixes cookie injection, request/response framing problems, and excessive CPU or memory consumption from certain inputs.</p> <p><strong>Go 1.26 or newer is now required.</strong> <a href="https://redirect.github.com/valyala/fasthttp/pull/2395">#2395</a></p> <h2>Performance improvements</h2> <ul> <li><strong>HTTP parsing:</strong> request headers are parsed and validated in one pass, with common methods and HTTP/1.1 recognized directly. Header values, case conversion, host validation, and control-byte checks process multiple bytes at a time. The parser also avoids repeatedly scanning the same incomplete header block when data arrives in small reads. <a href="https://redirect.github.com/valyala/fasthttp/pull/2413">#2413</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2414">#2414</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2428">#2428</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2423">#2423</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2412">#2412</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2438">#2438</a></li> <li><strong>HTTP writing:</strong> fewer header and response copies, cached serialized <code>Server</code> and <code>Date</code> lines, faster HTTP date formatting, and fewer flushes around chunked trailers. Large buffered responses can use <code>writev</code> on TCP and Unix connections; TLS and streamed bodies retain the buffered path. <a href="https://redirect.github.com/valyala/fasthttp/pull/2425">#2425</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2415">#2415</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2434">#2434</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2426">#2426</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2433">#2433</a></li> <li><strong>URI processing:</strong> memoized authority parsing, a fast path for <code>/</code>, faster quoting and validation, and linear-time path normalization. <a href="https://redirect.github.com/valyala/fasthttp/pull/2411">#2411</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2423">#2423</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2453">#2453</a></li> <li><strong>Static files:</strong> cached files of up to 8 KiB can be served from memory, avoiding a file read on each cache hit and releasing the file descriptor. The new small-file content cache is bounded to 4096 files, or at most 32 MiB per <code>FS</code>; the existing cache metadata is separate. Changes to these files become visible after cache expiration (<code>CacheDuration</code>, 10 seconds by default). <a href="https://redirect.github.com/valyala/fasthttp/pull/2446">#2446</a></li> <li><strong>Client and server overhead:</strong> clients avoid redundant deadline updates when no timeout is active. The opt-in <code>Server.LazyRequestTime</code> avoids reading the clock until <code>RequestCtx.Time()</code> is called; with this option, the returned time is the time of the first call. The benchmark comparison below uses the default setting. <a href="https://redirect.github.com/valyala/fasthttp/pull/2439">#2439</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2404">#2404</a></li> </ul> <h2>Security fixes and hardening</h2> <ul> <li><strong>Streamed request bodies are drained before connection reuse.</strong> With <code>StreamRequestBody</code> enabled, the server drains unread body data before reusing the connection, with a 256 KiB drain limit, or closes the connection when safe draining is not possible. Responses are flushed before draining so early replies reach clients still uploading, and response streams can consume the request body before its remaining size is checked. <a href="https://redirect.github.com/valyala/fasthttp/pull/2368">#2368</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2461">#2461</a></li> <li><strong>Rejected <code>100-continue</code> requests close the connection.</strong> A denied request could previously leave its body unread and have those bytes interpreted as the next request, desynchronizing a reused connection. <a href="https://redirect.github.com/valyala/fasthttp/pull/2450">#2450</a></li> <li><strong>Cookie setters prevent additional-cookie injection.</strong> <code>RequestHeader.SetCookie</code> and its byte variants now sanitize semicolons in names and values, so one logical cookie cannot become multiple cookies on the wire. <a href="https://redirect.github.com/valyala/fasthttp/pull/2393">#2393</a></li> <li><strong>Bounded zstd decoding limits decoder memory demand as well as output.</strong> A small compressed frame could previously declare a large decoder window even when a decoded-body limit was configured. Positive <code>BodyUnzstdWithLimit</code> limits now select a memory-limited decoder, with caps rounded up in 8 MiB buckets; exceeding the decoder limit returns <code>ErrBodyTooLarge</code>. <a href="https://redirect.github.com/valyala/fasthttp/pull/2407">#2407</a></li> <li><strong>Path normalization avoids quadratic work.</strong> Repeated separators and dot segments are processed in linear time, reducing the CPU amplification possible with crafted request targets. Incomplete headers arriving one byte at a time also avoid repeated full-block scans. <a href="https://redirect.github.com/valyala/fasthttp/pull/2453">#2453</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2413">#2413</a></li> <li><strong>Bodyless responses preserve framing.</strong> HEAD and status-defined bodyless responses no longer emit trailer bytes that can be mistaken for the next response. Serialization suppresses forbidden <code>Content-Length</code> and <code>Transfer-Encoding</code> on 1xx/204 responses. Explicit content-type metadata and permitted 304 metadata remain supported. <a href="https://redirect.github.com/valyala/fasthttp/pull/2441">#2441</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2447">#2447</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2457">#2457</a></li> <li><strong>Pipeline clients gain a response-body limit and better failure cleanup.</strong> Set the new <code>PipelineClient.MaxResponseBodySize</code> to a positive value to reject oversized responses, including with <code>Response.StreamBody</code>; the default remains unlimited. Idle workers now retire after errors, abandoned requests release their streams, and failed connection establishment is throttled. <a href="https://redirect.github.com/valyala/fasthttp/pull/2427">#2427</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2458">#2458</a></li> </ul> <p>Argument sorting now honors any negative comparator result in <code>Args.Sort</code> and <code>Args.SortKeys</code>, and static-file serving rejects zero-length suffix byte ranges (<code>bytes=-0</code>) with <code>416 Range Not Satisfiable</code>. <a href="https://redirect.github.com/valyala/fasthttp/pull/2459">#2459</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2460">#2460</a></p> <p>Other significant changes include opt-in ETags for <code>FS</code>, a <code>net/http</code> request conversion function, improved adaptor handling of flushes, aborts and trailers, and fixes to shutdown and per-IP connection lifetimes. <a href="https://redirect.github.com/valyala/fasthttp/pull/2399">#2399</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2104">#2104</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2429">#2429</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2445">#2445</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2352">#2352</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2402">#2402</a></p> <h2>Benchmark results</h2> <p>Compared <code>v1.74.0</code> with master <code>6141d3a</code> on Ubuntu 26.04, an AMD EPYC 9454, and Go 1.27.1. Each benchmark has ten samples per revision, run alternately with the same inputs and CPU affinity. Negative percentages mean less time per operation. All rows below have p < 0.001.</p> <table> <thead> <tr> <th>Benchmark</th> <th align="right">v1.74.0</th> <th align="right">Release candidate</th> <th align="right">Time/op change</th> </tr> </thead> <tbody> <tr> <td>Minimal GET, pipeline depth 64</td> <td align="right">484.30 ns</td> <td align="right">278.05 ns</td> <td align="right">-42.6%</td> </tr> <tr> <td>Browser-shaped GET, pipeline depth 16</td> <td align="right">1.080 µs</td> <td align="right">722.55 ns</td> <td align="right">-33.1%</td> </tr> <tr> <td>Request-header parsing</td> <td align="right">561.80 ns</td> <td align="right">348.15 ns</td> <td align="right">-38.0%</td> </tr> <tr> <td>Response-header parsing</td> <td align="right">466.95 ns</td> <td align="right">277.55 ns</td> <td align="right">-40.6%</td> </tr> <tr> <td>Request-header writing</td> <td align="right">49.84 ns</td> <td align="right">37.45 ns</td> <td align="right">-24.8%</td> </tr> <tr> <td>Response-header writing</td> <td align="right">68.64 ns</td> <td align="right">40.99 ns</td> <td align="right">-40.3%</td> </tr> <tr> <td>Cached 1 KiB file, directory</td> <td align="right">2.324 µs</td> <td align="right">611.85 ns</td> <td align="right">-73.7%</td> </tr> <tr> <td>Cached 1 KiB file, <code>os.DirFS</code></td> <td align="right">3.805 µs</td> <td align="right">612.30 ns</td> <td align="right">-83.9%</td> </tr> <tr> <td>URI path with query string</td> <td align="right">91.39 ns</td> <td align="right">46.06 ns</td> <td align="right">-49.6%</td> </tr> <tr> <td>HTTP date formatting</td> <td align="right">108.25 ns</td> <td align="right">28.59 ns</td> <td align="right">-73.6%</td> </tr> <tr> <td>Trickled ~4 KiB headers, one byte per read</td> <td align="right">1385.784 µs</td> <td align="right">191.257 µs</td> <td align="right">-86.2%</td> </tr> <tr> <td>8 KiB path of repeated <code>/</code></td> <td align="right">352.529 µs</td> <td align="right">54.330 µs</td> <td align="right">-84.6%</td> </tr> <tr> <td>~8 KiB path of repeated <code>/a/..</code></td> <td align="right">96.733 µs</td> <td align="right">22.253 µs</td> <td align="right">-77.0%</td> </tr> <tr> <td>TCP client/server round trips, small response</td> <td align="right">5.193 µs</td> <td align="right">5.030 µs</td> <td align="right">-3.1%</td> </tr> <tr> <td>TCP client/server round trips, 64 KiB response</td> <td align="right">15.302 µs</td> <td align="right">13.478 µs</td> <td align="right">-11.9%</td> </tr> </tbody> </table> <p>The pipelined serving and file benchmarks use an in-memory connection with writes discarded. The two TCP rows include real loopback networking. These results describe the selected workloads; TCP gains are smaller than the gains in parsing and serialization. <code>Server.LazyRequestTime</code> remains disabled in this comparison.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/valyala/fasthttp/commit/818be799bc0b086b5df262d6382bf5875fbd58f4"><code>818be79</code></a> fix: preserve response behavior while draining streamed requests (<a href="https://redirect.github.com/valyala/fasthttp/issues/2461">#2461</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/741bd4144c2a57c82499ceecb7648b0cbd6456d6"><code>741bd41</code></a> fix(fs): reject zero-length suffix byte ranges (<a href="https://redirect.github.com/valyala/fasthttp/issues/2460">#2460</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/06d8ae84c6bea09350e2fd67fbb86e2095d36057"><code>06d8ae8</code></a> discard unread streamed request body before the next request (<a href="https://redirect.github.com/valyala/fasthttp/issues/2368">#2368</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/54759cc7bed45435350e4ae525986b96ac2900e7"><code>54759cc</code></a> fix(args): use comparator sign in Sort and SortKeys (<a href="https://redirect.github.com/valyala/fasthttp/issues/2459">#2459</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/6141d3a6205bec7f51225a058fbcc578efdd9a17"><code>6141d3a</code></a> fix: stop idle PipelineClient workers after errors (<a href="https://redirect.github.com/valyala/fasthttp/issues/2458">#2458</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/c7861c0abbdc5fa042b27fa005dad36e4419f49d"><code>c7861c0</code></a> Omit Transfer-Encoding on 1xx and 204 responses (<a href="https://redirect.github.com/valyala/fasthttp/issues/2457">#2457</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/9242984426b10bca0d7e40e3002796576c669a21"><code>9242984</code></a> leave an empty upfront Server or User-Agent out of PeekAll (<a href="https://redirect.github.com/valyala/fasthttp/issues/2443">#2443</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/a0690e59fb50658ef5c8f1763fc625c55958e2e9"><code>a0690e5</code></a> fix(request): warn when Request.Body() is called on streamed requests (<a href="https://redirect.github.com/valyala/fasthttp/issues/2350">#2350</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/7ae14bec2191f359f6d974697dccfdce07cb9985"><code>7ae14be</code></a> Preserve NoDefaultContentType across client response resets (<a href="https://redirect.github.com/valyala/fasthttp/issues/2455">#2455</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/c997615ad95bf6c0b2c2898011c7807883860558"><code>c997615</code></a> perf: serve small cached files from memory in FS (<a href="https://redirect.github.com/valyala/fasthttp/issues/2446">#2446</a>)</li> <li>Additional commits viewable in <a href="https://github.com/valyala/fasthttp/compare/v1.74.0...v1.75.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
5383b59b8e
commit
ab91c8ac57
2 files changed
+5
-5
No files matched your search
@@ -247,7 +247,7 @@ require (
|
||||
github.com/tidwall/gjson v1.19.0
|
||||
github.com/u-root/u-root v0.14.0
|
||||
github.com/unrolled/secure v1.17.0
|
||||
github.com/valyala/fasthttp v1.74.0
|
||||
github.com/valyala/fasthttp v1.75.0
|
||||
github.com/wagslane/go-password-validator v0.3.0
|
||||
github.com/zclconf/go-cty-yaml v1.2.0
|
||||
go.nhat.io/otelsql v0.16.0
|
||||
|
||||
@@ -943,8 +943,8 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
||||
github.com/molecule-man/go-brrr v1.0.1 h1:cEjgx8hgNw6UGdhQ94SPDbPkKuRbkUcxBO3IzbGpA/o=
|
||||
github.com/molecule-man/go-brrr v1.0.1/go.mod h1:7ybW6/7gA3oKY45jOfVNjSJDtrr6ea4tzbsTkjmQDC4=
|
||||
github.com/molecule-man/go-brrr v1.1.1 h1:KYwusQhjtV3smALnhmafZf4OBrh7vP4p8O47DyUmmuY=
|
||||
github.com/molecule-man/go-brrr v1.1.1/go.mod h1:7ybW6/7gA3oKY45jOfVNjSJDtrr6ea4tzbsTkjmQDC4=
|
||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
|
||||
@@ -1228,8 +1228,8 @@ github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
|
||||
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.74.0 h1:wMS9fnO2QTALozYx5pId2Vi7ZwU/epUkY8i/KPWCHoU=
|
||||
github.com/valyala/fasthttp v1.74.0/go.mod h1:3ARmLamUcw7ElxVtC8PXaGzQ6VEuvnetlkrwIklQBSE=
|
||||
github.com/valyala/fasthttp v1.75.0 h1:W3xrvNJHG60j2ZCjxpP8kkB+oPG8kh9/g1n4+3xUwNA=
|
||||
github.com/valyala/fasthttp v1.75.0/go.mod h1:JiVkPRZU124PuPsreV/s9dZRgG2lRK7wNEikdQ0Rk4s=
|
||||
github.com/valyala/fastjson v1.6.10 h1:/yjJg8jaVQdYR3arGxPE2X5z89xrlhS0eGXdv+ADTh4=
|
||||
github.com/valyala/fastjson v1.6.10/go.mod h1:e6FubmQouUNP73jtMLmcbxS6ydWIpOfhz34TSfO3JaE=
|
||||
github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4=
|
||||
|
||||
Reference in new issue
Block a user