v1.78.0
v1.78.0 fixes lost responses during graceful shutdown and makes streamed bodies report truncation reliably. It also improves redirect handling, preserves multipart uploads when copying requests, and speeds up path normalization, query parsing, header operations, and concurrent client requests.
- Graceful shutdown preserves responses on keep-alive connections. An idle connection could be closed just as its next request entered the handler, leaving the client with EOF even though the handler had done the work. Shutdown now closes the idle connection before the handler runs or lets the active request finish. Buffered pipelined responses are flushed before the connection closes. #2537
- Incomplete chunked streams report an error. Streamed request and response bodies now report
io.ErrUnexpectedEOFif the peer closes at a chunk boundary before the terminating chunk arrives. If the trailer section is incomplete, the stream returnsErrBrokenChunkwrappingio.ErrUnexpectedEOF. #2515, #2538 - Adapted
net/httphandlers preserve the final response after a 1xx status. A handler that writes103 Early Hintsfollowed by200 OKnow sends the200and its body. The adaptor does not forward the interim status;101 Switching Protocolsremains final. #2516 - Body-buffer retention is scoped to the request that enabled it. The server clears a handler's
Request.KeepBodyBufferandResponse.KeepBodyBuffersettings before resetting for the next keep-alive request, so oversized buffers can be released according to the configured pool limit. #2508
- Redirects preserve links such as
mailto:and native-app callbacks.RequestCtx.Redirectkeeps targets with a scheme but no//intact. When the client receives a non-HTTP target of that form, it returns the 3xx response with itsLocationand no error. For references matching the base scheme,URI.Updateresolves the remainder as relative:http:nextagainsthttp://host/a/bresolves tohttp://host/a/next. #2503, #2506, #2507 - An invalid redirect location stops the client before it sends another request. When
Locationcannot be parsed, the client returns the redirect response and the parse error. The newURI.UpdateBytesErrexposes that error to callers;URI.UpdateandURI.UpdateBytesretain their existing behavior. #2523 - An explicit
Authorizationheader takes precedence over URL credentials. When the header is empty, Basic authentication uses the percent-decoded username and password from the URI:p%40ssbecomesp@ss, and a literal+stays+.URI.Parsealso validates IPv6 literals with zone identifiers and rejects an empty zone. #2526, #2529, #2535
- Multipart forms parse and copy correctly. Form media types and the
boundaryparameter name are matched case-insensitively. Multipart parsing accepts optional whitespace around;and preserves semicolons inside quoted parameter values.Request.CopyToalso preserves uploads parsed directly from the incoming body, so forwarding the copy no longer sends an empty body. #2511, #2512, #2517, #2521 - Cookie parsing preserves usable attributes.
Expiresagain accepts RFC 1123 dates with zone names such asUTC. An unusableDomainorPathis ignored without discarding the cookie or skipping later attributes such asHttpOnly. #2519, #2524 - Compression works with single-file roots, mixed-case encodings, and zstd level zero.
FScan again serve compressed content whenRootnames a file, keeping compressed copies in its parent directory. Body decoders matchContent-Encodingcase-insensitively, and zstd level0selects the default level instead of panicking. #2505, #2509, #2510
Path normalization skips unnecessary dot-segment checks for filenames such as /app.min.js. Query parsing locates escapes while splitting arguments, header operations avoid redundant scans, and Client.Do reduces contention between concurrent callers. #2513
In the PR benchmarks, parsing paths with file extensions took 40% less time, query parsing took 29% less time, and concurrent Client.Do dispatch with a no-op transport took 19% less time at GOMAXPROCS=4. End-to-end improvements were smaller: 4–6% less time for cached small files and 6–8% less time for in-memory client requests. Allocation counts were unchanged, and the pipelined server benchmarks showed no significant change. #2513
- perf: speed up path normalization, query parsing, header setters and Client.Do by @gaby in https://github.com/valyala/fasthttp/pull/2513
- fix: don't drop responses on keep-alive connections during Shutdown by @aaydin-tr in https://github.com/valyala/fasthttp/pull/2537
- fix: report a chunked body stream truncated at a chunk boundary by @jaeminbird in https://github.com/valyala/fasthttp/pull/2515
- Expand HTTP fuzz coverage and reject truncated chunked streams by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2538
- fix(fasthttpadaptor): don't take a 1xx as the final status by @jaeminbird in https://github.com/valyala/fasthttp/pull/2516
- fix: clear KeepBodyBuffer before resetting between keep-alive requests by @jaeminbird in https://github.com/valyala/fasthttp/pull/2508
- fix: keep redirect URIs that have a scheme but no authority by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2503
- fix(client): don't follow redirects to non-HTTP schemes by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2506
- fix: resolve same-scheme references without "//" as relative by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2507
- fix: stop following a redirect whose Location can't be parsed by @gaby in https://github.com/valyala/fasthttp/pull/2523
- fix: decode percent-encoded userinfo in URI.Parse by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2526
- fix: don't replace a set Authorization header with the URI userinfo by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2529
- fix: validate IPv6 literals that have a zone in URI.Parse by @b84330808 in https://github.com/valyala/fasthttp/pull/2535
- fix: match form media types and the boundary parameter case-insensitively by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2511
- fix: allow optional whitespace around ';' in multipart/form-data by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2512
- fix: don't end a multipart/form-data parameter at a ';' inside quotes by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2517
- fix: copy a multipart body that was parsed as it was read in Request.CopyTo by @gaby in https://github.com/valyala/fasthttp/pull/2521
- fix(cookie): accept Expires dates in a time zone other than GMT by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2519
- fix(cookie): ignore a Domain or Path that can't be used instead of failing to parse by @gaby in https://github.com/valyala/fasthttp/pull/2524
- fix(fs): allow compression when Root is a file by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2505
- fix: match Content-Encoding case-insensitively when decoding bodies by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2509
- fix: map zstd level 0 to the default level instead of panicking by @jaeminbird in https://github.com/valyala/fasthttp/pull/2510
- fix(reuseport): return ErrNoReusePort again when SO_REUSEPORT is unsupported by @ElsiPotka in https://github.com/valyala/fasthttp/pull/2527
- fix(pprofhandler): serve the index at /debug/pprof/ again by @nk-batman21 in https://github.com/valyala/fasthttp/pull/2530
- chore(deps): bump github.com/molecule-man/go-brrr from 1.3.0 to 1.3.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2514
- chore(deps): bump golang.org/x/net from 0.61.0 to 0.62.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2532
- @jaeminbird made their first contribution in https://github.com/valyala/fasthttp/pull/2508
- @ElsiPotka made their first contribution in https://github.com/valyala/fasthttp/pull/2527
- @b84330808 made their first contribution in https://github.com/valyala/fasthttp/pull/2535
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.77.0...v1.78.0
v1.77.0
v1.77.0 strengthens static-file confinement, fixes hijacked connection handling, and improves HTTP and cookie compatibility. It also adds an opt-in bounded stream reader, configurable body-buffer retention, and deadline support for adapted net/http handlers.
Static-file symlink behavior changes by default. The default OS-backed FS now rejects symlinks that leave Root or CompressRoot, as well as absolute symlinks even when their targets are inside the root. Relative symlinks that stay inside the root continue to work. Set FS.AllowSymlinksOutsideRoot to restore the previous behavior when external symlinks are intentional. Custom FS.FS implementations are unaffected. #2490
- Default static-file operations stay within their configured roots. File reads and compressed-cache operations use
os.Rootto prevent symlink traversal outsideRootandCompressRoot. Each root is confined independently; empty roots withAllowEmptyRootand whole-volume roots retain their existing behavior. #2490 - Custom filesystems no longer trigger unrelated disk deletions. A stale compressed file in a custom
FS.FSpreviously caused anos.Removecall using its filesystem-relative name, potentially deleting a matching file in the process working directory. Custom filesystems now regenerate stale compressed content in memory without removing a disk file. #2489 - Kept hijacked connections no longer depend on a recycled request context. With both
KeepHijackedConnsandReduceMemoryUsageenabled, the hijacked reader is detached from the context before the hijack handler runs. This prevents later reads from panicking or accessing another client's connection after context reuse. #2495
- An opt-in stream reader bounds copied payload buffering.
NewBoundedStreamReaderworks withSetBodyStreamand applies backpressure when consumers fall behind. Active copied payload is limited to 160 KiB per bridge, or 320 KiB across the two bridges used by its bounded compression path. These limits exclude caller buffers, codecs, sockets, and other overhead; wrapping the reader loses the combined compression bound. ExistingNewStreamReaderandSetBodyStreamWriterbehavior is unchanged. #2488 - Request and response body buffers can be retained explicitly. The exported
Request.KeepBodyBufferandResponse.KeepBodyBufferfields preserve body buffers across resets for reuse. Releasing a request or response to the pool clears the retention setting. #2451 - Adapted handlers can configure connection deadlines.
RequestCtx.SetReadDeadlineandSetWriteDeadlineare also exposed throughfasthttpadaptor, enablinghttp.ResponseControllerdeadline calls. The adaptor still buffers the request body before invoking the handler, so a read deadline set inside an adapted handler cannot govern the preceding upload. #2452
- Weighted compression codings are recognized.
Accept-Encodingentries such asgzip;q=0.8now match, whileq=0makes a coding unacceptable. Matching remains case-insensitive and requires a complete coding token; quality-based preference ordering and wildcard matching are not added. #2491 - HTTP/1.0 clients no longer receive unsupported informational responses.
Expect: 100-continueis ignored for HTTP/1.0 requests, and103 Early Hintsis not sent to HTTP/1.0 clients. #2492, #2496 - Hijacking works with server keep-alive limits.
DisableKeepaliveand reachingMaxRequestsPerConnno longer suppress a registered hijack handler or add an unwantedConnection: closeto an upgrade response. Explicit connection-close requests and other existing close conditions still apply. #2494 - Pipe connection deadlines interrupt pending operations. Updating deadlines on
fasthttputil.PipeConnsnow affects blocked reads and writes, and write-deadline updates no longer race with writes. #2471 - Cookie parsing tolerates invalid attributes and handles names consistently. Invalid
Max-Ageattributes are ignored,Secure,HttpOnly, andPartitionedare recognized even with a value, and surrounding tabs are trimmed.Set-Cookievalues without=are stored under the same empty key returned byCookie.ParseBytes, keeping lookup and deletion consistent. #2497, #2498, #2500, #2501
Proxy authentication now uses decoded credentials in Proxy-Authorization, and static-file 416 Range Not Satisfiable responses include Content-Range. #2499, #2502
- fix(fs): resolve default FS paths with os.Root so they stay inside Root by @Thanatos9404 in https://github.com/valyala/fasthttp/pull/2490
- fix(fs): don't remove stale compressed files of a custom FS.FS from disk by @Thanatos9404 in https://github.com/valyala/fasthttp/pull/2489
- fix: detach kept hijacked connections from the request context's reader by @h2zi in https://github.com/valyala/fasthttp/pull/2495
- Add an opt-in bounded stream reader by @CSXizhang in https://github.com/valyala/fasthttp/pull/2488
- Export KeepBodyBuffer on Request and Response by @AdamMagued in https://github.com/valyala/fasthttp/pull/2451
- fasthttpadaptor: add support for ResponseController SetReadDeadline and SetWriteDeadline by @AdamMagued in https://github.com/valyala/fasthttp/pull/2452
- fix: accept Accept-Encoding codings that carry a quality value by @ybai08 in https://github.com/valyala/fasthttp/pull/2491
- fix: ignore Expect: 100-continue in HTTP/1.0 requests by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2492
- fix: don't send 103 Early Hints to HTTP/1.0 clients by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2496
- fix: run hijack handlers under DisableKeepalive and MaxRequestsPerConn by @h2zi in https://github.com/valyala/fasthttp/pull/2494
- make PipeConns deadlines interrupt pending reads and writes by @h2zi in https://github.com/valyala/fasthttp/pull/2471
- fix(cookie): ignore an invalid Max-Age attribute instead of failing to parse by @nk-batman21 in https://github.com/valyala/fasthttp/pull/2497
- fix(fasthttpproxy): send decoded proxy credentials in Proxy-Authorization by @nk-batman21 in https://github.com/valyala/fasthttp/pull/2499
- fix(cookie): recognize Secure, HttpOnly and Partitioned with a value by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2498
- fix(cookie): trim tabs around cookie names, values and attributes by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2500
- fix(cookie): store Set-Cookie without '=' under the key ParseBytes gives it by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2501
- fix(fs): send Content-Range with 416 responses by @wleeaf in https://github.com/valyala/fasthttp/pull/2502
- @ybai08 made their first contribution in https://github.com/valyala/fasthttp/pull/2491
- @Thanatos9404 made their first contribution in https://github.com/valyala/fasthttp/pull/2489
- @AdamMagued made their first contribution in https://github.com/valyala/fasthttp/pull/2452
- @nk-batman21 made their first contribution in https://github.com/valyala/fasthttp/pull/2497
- @wleeaf made their first contribution in https://github.com/valyala/fasthttp/pull/2502
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.76.0...v1.77.0
v1.76.0
v1.76.0 strengthens HTTP message framing, static-file isolation, and server connection handling. It also improves HTTP compatibility, avoids quadratic work when parsing large trailer sets, and adds configurable TCP keep-alives to TCPDialer.
- Multipart parsing consumes the entire declared body. Bytes after the closing multipart boundary are drained before the connection is reused, preventing a multipart epilogue from being interpreted as another request. #2336
- Outgoing messages preserve framing. Raw
Content-Lengthheaders are synchronized with the outgoing body, duplicate or conflicting framing headers are rejected, and fixed-length request and response streams cannot write beyond their declared size.FSandSendFilealso stop at the advertisedContent-Lengthwhen a file grows during serving. #2470, #2462 - Requests with both
Content-LengthandTransfer-Encodingclose the connection. The connection is no longer reused after a request containing both framing headers. #2476 - Virtual-host file serving preserves directory isolation.
NewVHostPathRewriteravoids decoding the host and path twice and handles invalid hosts safely, preventing crafted requests from escaping the virtual-host directory and accessing files directly underFS.Root. This affectsFShandlers usingNewVHostPathRewriter. #2487 - Rejected TLS connections no longer block the accept loop. Connections rejected by
MaxConnsPerIPorConcurrencyare closed without attempting an HTTP error response, which could otherwise trigger a TLS handshake and stall while waiting for aClientHello. IPv6 clients are now also counted againstMaxConnsPerIP. #2486, #2468
- Trailer parsing avoids quadratic work. Large sets of trailer names use indexed membership checks instead of repeatedly scanning all previously recorded names. This reduces CPU amplification from crafted
Trailerheaders and chunked trailer sections while preserving trailer order. #2465
- Static files handle range and conditional requests more accurately. Unsupported range units and multiple ranges are ignored instead of returning
416; invalid single byte ranges still return416.Rangeis also ignored whenIf-Rangedoes not match, and bothRangeandIf-Modified-Sinceare ignored for methods other than GET and HEAD. #2467, #2473, #2474, #2475 - Pipeline clients handle HEAD responses without reading a body.
PipelineClientskips the response body for HEAD requests. #2469 - HTTP parsing accepts valid legacy formats and matches tokens correctly.
ParseHTTPDateaccepts obsolete HTTP-date formats, cookies with an invalidExpiresattribute remain parseable,Expect: 100-continueis matched case-insensitively, andAccept-Encodingmatches complete tokens. Asterisk-form request targets are rejected for methods other than OPTIONS. #2466, #2481, #2482, #2479, #2463 - TCP keep-alives are configurable. The new
TCPDialer.KeepAlivefield sets the keep-alive period for connections created by the dialer; a negative value disables keep-alives. #2484
- consume the rest of the declared body in readMultipartForm by @alhudz in https://github.com/valyala/fasthttp/pull/2336
- fix: validate outgoing request framing by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2470
- stop FS and SendFile at Content-Length when the file has grown by @alhudz in https://github.com/valyala/fasthttp/pull/2462
- fix: close the connection after a request with both Content-Length and Transfer-Encoding by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2476
- fix(fs): preserve vhost isolation during path rewriting by @koyokr in https://github.com/valyala/fasthttp/pull/2487
- Fix TLS connection rejection blocking the accept loop by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2486
- count IPv6 clients against MaxConnsPerIP by @alhudz in https://github.com/valyala/fasthttp/pull/2468
- make addTrailerKey linear in the size of the trailer set by @alhudz in https://github.com/valyala/fasthttp/pull/2465
- feat: add KeepAlive option to TCPDialer by @littfed in https://github.com/valyala/fasthttp/pull/2484
- fix(header): reject asterisk-form request-target for non-OPTIONS methods by @aadieng100 in https://github.com/valyala/fasthttp/pull/2463
- fix: accept the obsolete HTTP-date formats in ParseHTTPDate by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2466
- fix(fs): ignore Range headers FS can't serve instead of replying 416 by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2467
- skip the response body for HEAD requests in PipelineClient by @alhudz in https://github.com/valyala/fasthttp/pull/2469
- fix(fs): ignore If-Modified-Since for methods other than GET and HEAD by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2474
- fix(fs): ignore Range when the If-Range validator doesn't match by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2473
- fix(fs): ignore Range for methods other than GET and HEAD by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2475
- fix(cookie): ignore an invalid Expires attribute instead of failing to parse by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2481
- fix: match the Expect: 100-continue value case-insensitively by @LuisFigueroaG in https://github.com/valyala/fasthttp/pull/2482
- fix: match complete Accept-Encoding tokens by @jabrailkhalil in https://github.com/valyala/fasthttp/pull/2479
- docs: clarify RequestURI host behavior by @oozan in https://github.com/valyala/fasthttp/pull/2355
- chore(deps): bump github.com/molecule-man/go-brrr from 1.1.1 to 1.2.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2464
- chore(deps): bump github.com/molecule-man/go-brrr from 1.2.0 to 1.3.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2483
- chore(deps): bump golang.org/x/sys from 0.48.0 to 0.49.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2477
- chore(deps): bump golang.org/x/net from 0.59.0 to 0.61.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2478
- chore(deps): bump github.com/klauspost/compress from 1.20.1 to 1.20.3 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2485
- @aadieng100 made their first contribution in https://github.com/valyala/fasthttp/pull/2463
- @LuisFigueroaG made their first contribution in https://github.com/valyala/fasthttp/pull/2466
- @oozan made their first contribution in https://github.com/valyala/fasthttp/pull/2355
- @jabrailkhalil made their first contribution in https://github.com/valyala/fasthttp/pull/2479
- @koyokr made their first contribution in https://github.com/valyala/fasthttp/pull/2487
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.75.0...v1.76.0
v1.75.0
v1.75.0 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.
Go 1.26 or newer is now required. #2395
- HTTP parsing: 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. #2413, #2414, #2428, #2423, #2412, #2438
- HTTP writing: fewer header and response copies, cached serialized
ServerandDatelines, faster HTTP date formatting, and fewer flushes around chunked trailers. Large buffered responses can usewritevon TCP and Unix connections; TLS and streamed bodies retain the buffered path. #2425, #2415, #2434, #2426, #2433 - URI processing: memoized authority parsing, a fast path for
/, faster quoting and validation, and linear-time path normalization. #2411, #2423, #2453 - Static files: 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
FS; the existing cache metadata is separate. Changes to these files become visible after cache expiration (CacheDuration, 10 seconds by default). #2446 - Client and server overhead: clients avoid redundant deadline updates when no timeout is active. The opt-in
Server.LazyRequestTimeavoids reading the clock untilRequestCtx.Time()is called; with this option, the returned time is the time of the first call. The benchmark comparison below uses the default setting. #2439, #2404
- Streamed request bodies are drained before connection reuse. With
StreamRequestBodyenabled, 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. #2368, #2461 - Rejected
100-continuerequests close the connection. A denied request could previously leave its body unread and have those bytes interpreted as the next request, desynchronizing a reused connection. #2450 - Cookie setters prevent additional-cookie injection.
RequestHeader.SetCookieand its byte variants now sanitize semicolons in names and values, so one logical cookie cannot become multiple cookies on the wire. #2393 - Bounded zstd decoding limits decoder memory demand as well as output. A small compressed frame could previously declare a large decoder window even when a decoded-body limit was configured. Positive
BodyUnzstdWithLimitlimits now select a memory-limited decoder, with caps rounded up in 8 MiB buckets; exceeding the decoder limit returnsErrBodyTooLarge. #2407 - Path normalization avoids quadratic work. 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. #2453, #2413
- Bodyless responses preserve framing. HEAD and status-defined bodyless responses no longer emit trailer bytes that can be mistaken for the next response. Serialization suppresses forbidden
Content-LengthandTransfer-Encodingon 1xx/204 responses. Explicit content-type metadata and permitted 304 metadata remain supported. #2441, #2447, #2457 - Pipeline clients gain a response-body limit and better failure cleanup. Set the new
PipelineClient.MaxResponseBodySizeto a positive value to reject oversized responses, including withResponse.StreamBody; the default remains unlimited. Idle workers now retire after errors, abandoned requests release their streams, and failed connection establishment is throttled. #2427, #2458
Argument sorting now honors any negative comparator result in Args.Sort and Args.SortKeys, and static-file serving rejects zero-length suffix byte ranges (bytes=-0) with 416 Range Not Satisfiable. #2459, #2460
Other significant changes include opt-in ETags for FS, a net/http request conversion function, improved adaptor handling of flushes, aborts and trailers, and fixes to shutdown and per-IP connection lifetimes. #2399, #2104, #2429, #2445, #2352, #2402
Compared v1.74.0 with master 6141d3a 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.
| Benchmark | v1.74.0 | Release candidate | Time/op change |
|---|---|---|---|
| Minimal GET, pipeline depth 64 | 484.30 ns | 278.05 ns | -42.6% |
| Browser-shaped GET, pipeline depth 16 | 1.080 µs | 722.55 ns | -33.1% |
| Request-header parsing | 561.80 ns | 348.15 ns | -38.0% |
| Response-header parsing | 466.95 ns | 277.55 ns | -40.6% |
| Request-header writing | 49.84 ns | 37.45 ns | -24.8% |
| Response-header writing | 68.64 ns | 40.99 ns | -40.3% |
| Cached 1 KiB file, directory | 2.324 µs | 611.85 ns | -73.7% |
Cached 1 KiB file, os.DirFS |
3.805 µs | 612.30 ns | -83.9% |
| URI path with query string | 91.39 ns | 46.06 ns | -49.6% |
| HTTP date formatting | 108.25 ns | 28.59 ns | -73.6% |
| Trickled ~4 KiB headers, one byte per read | 1385.784 µs | 191.257 µs | -86.2% |
8 KiB path of repeated / |
352.529 µs | 54.330 µs | -84.6% |
~8 KiB path of repeated /a/.. |
96.733 µs | 22.253 µs | -77.0% |
| TCP client/server round trips, small response | 5.193 µs | 5.030 µs | -3.1% |
| TCP client/server round trips, 64 KiB response | 15.302 µs | 13.478 µs | -11.9% |
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. Server.LazyRequestTime remains disabled in this comparison.
- Require Go 1.26 for golang.org/x by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2395
- discard unread streamed request body before the next request by @alhudz in https://github.com/valyala/fasthttp/pull/2368
- close the connection when ContinueHandler denies a request by @alhudz in https://github.com/valyala/fasthttp/pull/2450
- limit zstd decoder memory in WithLimit methods by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2407
- Strip semicolons in RequestHeader.SetCookie by @youdie006 in https://github.com/valyala/fasthttp/pull/2393
- make normalizePath linear in the length of the path by @alhudz in https://github.com/valyala/fasthttp/pull/2453
- Omit the trailer section from a response without a body by @h2zi in https://github.com/valyala/fasthttp/pull/2441
- Omit Transfer-Encoding on 1xx and 204 responses by @davidscottpope-gif in https://github.com/valyala/fasthttp/pull/2457
- Omit Content-Length/Content-Type on a parsed bodyless response when re-serializing by @januththedev in https://github.com/valyala/fasthttp/pull/2447
- Add MaxResponseBodySize to PipelineClient by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2427
- fix: stop idle PipelineClient workers after errors by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2458
- perf: parse request headers in one validating pass by @h2zi in https://github.com/valyala/fasthttp/pull/2413
- perf: scan the request header block once while parsing by @gaby in https://github.com/valyala/fasthttp/pull/2424
- perf: serve small cached files from memory in FS by @gaby in https://github.com/valyala/fasthttp/pull/2446
- perf: serialize responses with fewer copies and send large ones with writev by @h2zi in https://github.com/valyala/fasthttp/pull/2415
- perf: cut redundant copies out of header serialization by @gaby in https://github.com/valyala/fasthttp/pull/2425
- perf: scan header values, control bytes and case eight bytes at a time by @gaby in https://github.com/valyala/fasthttp/pull/2428
- perf: speed up host validation and query/path quoting- #154 by @gaby in https://github.com/valyala/fasthttp/pull/2423
- perf: memoize authority parsing and fast-path the root path by @h2zi in https://github.com/valyala/fasthttp/pull/2411
- perf: recognize GET, POST, HEAD and HTTP/1.1 without byte-wise validation by @h2zi in https://github.com/valyala/fasthttp/pull/2414
- perf: scan the request target for control bytes a word at a time by @h2zi in https://github.com/valyala/fasthttp/pull/2412
- perf: skip redundant deadline updates on client connections by @gaby in https://github.com/valyala/fasthttp/pull/2439
- perf: preform the Date header line once a second by @h2zi in https://github.com/valyala/fasthttp/pull/2434
- perf: format HTTP dates without time.AppendFormat by @gaby in https://github.com/valyala/fasthttp/pull/2426
- perf: keep the last chunk buffered for the trailer section by @h2zi in https://github.com/valyala/fasthttp/pull/2433
- perf: keep the control-byte scans inlinable by @h2zi in https://github.com/valyala/fasthttp/pull/2438
- fix: request time left at zero, and an opt in Server.LazyRequestTime by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2404
- Add opt-in ETag support to FS by @anandghegde in https://github.com/valyala/fasthttp/pull/2399
- Add ConvertNetHttpRequestToFastHttpRequest adaptor function by @aaydin-tr in https://github.com/valyala/fasthttp/pull/2104
- fix: preserve response behavior while draining streamed requests by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2461
- fix: per-IP wrapper lifetime, TLS state unwrapping and ConnState timing by @h2zi in https://github.com/valyala/fasthttp/pull/2352
- fix: carry net/http handler contracts through the fasthttpadaptor by @h2zi in https://github.com/valyala/fasthttp/pull/2429
- Carry response trailers through the fasthttpadaptor by @h2zi in https://github.com/valyala/fasthttp/pull/2445
- fix: write trailers for buffered bodies in Request.Write and Response.Write by @aaydin-tr in https://github.com/valyala/fasthttp/pull/2378
- Start compressing a streamed body when the server reads it by @h2zi in https://github.com/valyala/fasthttp/pull/2442
- fix: synchronize RequestCtx.Done() with ShutdownWithContext by @cpsc in https://github.com/valyala/fasthttp/pull/2402
- fix: admit TimeoutHandler requests on servers driven by ServeConn by @h2zi in https://github.com/valyala/fasthttp/pull/2431
- fix: serve queued waiters when SetMaxConns grows the limit by @h2zi in https://github.com/valyala/fasthttp/pull/2430
- fix: recheck idle connections before queuing waiters by @HarveyBase in https://github.com/valyala/fasthttp/pull/2394
- fix: recognize case-insensitive and multi-value Connection: close (#2418) by @littfed in https://github.com/valyala/fasthttp/pull/2420
- fix: preserve zero Max-Age when parsing cookies by @jakezwang in https://github.com/valyala/fasthttp/pull/2405
- fix: accept a negative Max-Age when parsing cookies by @SulimanAbdulrazzaq in https://github.com/valyala/fasthttp/pull/2416
- Preserve NoDefaultContentType across client response resets by @CSXizhang in https://github.com/valyala/fasthttp/pull/2455
- fix(fs): reject zero-length suffix byte ranges by @kevin9327 in https://github.com/valyala/fasthttp/pull/2460
- fix(args): use comparator sign in Sort and SortKeys by @sergioperezcheco in https://github.com/valyala/fasthttp/pull/2459
- fix: preserve redirect path normalization setting in Request.CopyTo by @cuishuang in https://github.com/valyala/fasthttp/pull/2389
- fix: normalize a trailing /. path segment by @sachhg in https://github.com/valyala/fasthttp/pull/2392
- fix: mask ConnRequestNum into its 32-bit RequestCtx.ID field by @h2zi in https://github.com/valyala/fasthttp/pull/2432
- Return no values from PeekAll for absent special headers by @youdie006 in https://github.com/valyala/fasthttp/pull/2401
- Leave an empty upfront Server or User-Agent out of PeekAll by @h2zi in https://github.com/valyala/fasthttp/pull/2443
- Skip RFC-valid empty elements in VisitHeaderParams by @vzer200 in https://github.com/valyala/fasthttp/pull/2388
- fix(request): warn when Request.Body() is called on streamed requests by @VedantMadane in https://github.com/valyala/fasthttp/pull/2350
- docs: show how to read a bounded response prefix by @fzlzjerry in https://github.com/valyala/fasthttp/pull/2369
- docs: clarify that ShutdownWithContext error does not freeze the Server by @hazyhaar in https://github.com/valyala/fasthttp/pull/2422
- test: add benchmarks for pipelined and browser-shaped serving by @h2zi in https://github.com/valyala/fasthttp/pull/2409
- test: scale hard-coded deadlines with testTimeout by @h2zi in https://github.com/valyala/fasthttp/pull/2410
- Update golangci-lint to v2.13.2 and get rid of the separate gosec action by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2386
- chore(deps): bump github.com/klauspost/compress from 1.20.0 to 1.20.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2448
- chore(deps): bump golang.org/x/net from 0.58.0 to 0.59.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2397
- chore(deps): bump github.com/molecule-man/go-brrr from 1.0.1 to 1.1.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2417
- @vzer200 made their first contribution in https://github.com/valyala/fasthttp/pull/2388
- @youdie006 made their first contribution in https://github.com/valyala/fasthttp/pull/2393
- @aaydin-tr made their first contribution in https://github.com/valyala/fasthttp/pull/2378
- @sachhg made their first contribution in https://github.com/valyala/fasthttp/pull/2392
- @cpsc made their first contribution in https://github.com/valyala/fasthttp/pull/2402
- @jakezwang made their first contribution in https://github.com/valyala/fasthttp/pull/2405
- @SulimanAbdulrazzaq made their first contribution in https://github.com/valyala/fasthttp/pull/2416
- @HarveyBase made their first contribution in https://github.com/valyala/fasthttp/pull/2394
- @anandghegde made their first contribution in https://github.com/valyala/fasthttp/pull/2399
- @littfed made their first contribution in https://github.com/valyala/fasthttp/pull/2420
- @januththedev made their first contribution in https://github.com/valyala/fasthttp/pull/2447
- @hazyhaar made their first contribution in https://github.com/valyala/fasthttp/pull/2422
- @CSXizhang made their first contribution in https://github.com/valyala/fasthttp/pull/2455
- @VedantMadane made their first contribution in https://github.com/valyala/fasthttp/pull/2350
- @davidscottpope-gif made their first contribution in https://github.com/valyala/fasthttp/pull/2457
- @sergioperezcheco made their first contribution in https://github.com/valyala/fasthttp/pull/2459
- @kevin9327 made their first contribution in https://github.com/valyala/fasthttp/pull/2460
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.74.0...v1.75.0
v1.74.0
- fix(fasthttpproxy): select proxies from the request scheme by @dev-willbird1936 in https://github.com/valyala/fasthttp/pull/2334
- test: scale short timeouts with testTimeout to reduce -race flakiness by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2339
- fix: drop zeroed entries from the perIPConnCounter map by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2337
- perf: skip the unusable per-call file cache in ServeFS by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2338
- test: return after a failed Dial instead of dereferencing a nil conn by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2341
- fix: don't recycle an idle timestamp its connection still owns by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2342
- reject Transfer-Encoding on HTTP/1.0 requests by @alhudz in https://github.com/valyala/fasthttp/pull/2330
- only treat "//" in URI.Update as an authority after a scheme by @alhudz in https://github.com/valyala/fasthttp/pull/2345
- fix: consume informational responses before the final response by @dev-willbird1936 in https://github.com/valyala/fasthttp/pull/2333
- fix: reject out-of-range Content-Length instead of wrapping it by @lenamonj in https://github.com/valyala/fasthttp/pull/2343
- perf: zero-copy chunked body writes via io.WriterTo by @sasgas in https://github.com/valyala/fasthttp/pull/2310
- fix: don't close the shutdown done channel twice by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2340
- Rename ChunkedBodyWriterTo to BodyWriterTo and use in more places by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2348
- chore(deps): bump github.com/klauspost/compress from 1.19.1 to 1.19.2 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2349
- fix: small read buffer error doesn't match the ignored string anymore by @Pedr0Rocha in https://github.com/valyala/fasthttp/pull/2356
- Add canonical header lookup by @fzlzjerry in https://github.com/valyala/fasthttp/pull/2354
- chore(deps): bump golang.org/x/crypto from 0.54.0 to 0.55.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2361
- chore(deps): bump golang.org/x/net from 0.57.0 to 0.58.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2360
- Fix a pooled timer panic and a test data race by @h2zi in https://github.com/valyala/fasthttp/pull/2351
- fix: send / as the path when the request-target is query-only by @official-burak in https://github.com/valyala/fasthttp/pull/2371
- perf: try to avoid reallocations while reading zstd compressed requests by @ethercrow in https://github.com/valyala/fasthttp/pull/2357
- feat: add the QUERY method (RFC 10008) by @h2zi in https://github.com/valyala/fasthttp/pull/2358
- fix: wait for streaming reads before releasing pooled resources by @tbphp in https://github.com/valyala/fasthttp/pull/2353
- Replace github.com/andybalholm/brotli with github.com/molecule-man/go-brrr by @gaby in https://github.com/valyala/fasthttp/pull/2366
- Always stream response bodies when requested by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2373
- chore(deps): bump securego/gosec from 2.28.0 to 2.29.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2375
- fix: let request timeouts override client timeouts by @Harshal96 in https://github.com/valyala/fasthttp/pull/2372
- avoid race condition for closing the streaming connection at EOF by @akshaydeo in https://github.com/valyala/fasthttp/pull/2379
- Give TestClientHeadWithBody a CI-proof read timeout by @h2zi in https://github.com/valyala/fasthttp/pull/2374
- fix: prevent stale query string after clearing query args by @cuishuang in https://github.com/valyala/fasthttp/pull/2380
- feat(examples): add zero-allocation server example by @aabishkaryal in https://github.com/valyala/fasthttp/pull/2362
- chore(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2384
- @lenamonj made their first contribution in https://github.com/valyala/fasthttp/pull/2343
- @sasgas made their first contribution in https://github.com/valyala/fasthttp/pull/2310
- @Pedr0Rocha made their first contribution in https://github.com/valyala/fasthttp/pull/2356
- @fzlzjerry made their first contribution in https://github.com/valyala/fasthttp/pull/2354
- @h2zi made their first contribution in https://github.com/valyala/fasthttp/pull/2351
- @official-burak made their first contribution in https://github.com/valyala/fasthttp/pull/2371
- @ethercrow made their first contribution in https://github.com/valyala/fasthttp/pull/2357
- @tbphp made their first contribution in https://github.com/valyala/fasthttp/pull/2353
- @akshaydeo made their first contribution in https://github.com/valyala/fasthttp/pull/2379
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.73.0...v1.74.0
v1.73.0
- test: fix host comparison in FuzzURIParse by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2313
- perf: avoid redundant scans when parsing request headers by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2312
- Fix temp file leak in SaveMultipartFile on cross-device rename failure by @itxaiohanglover in https://github.com/valyala/fasthttp/pull/2311
- re-enable forcetypeassert by @Harshal96 in https://github.com/valyala/fasthttp/pull/2316
- test: normalize Go test names by @Harshal96 in https://github.com/valyala/fasthttp/pull/2317
- feat: prefix sentinel error strings by @Harshal96 in https://github.com/valyala/fasthttp/pull/2319
- fix(pprofhandler): use exact path matching to prevent debug data exposure by @xbrxr03 in https://github.com/valyala/fasthttp/pull/2302
- avoid following a symlink when writing the FS compressed cache by @alhudz in https://github.com/valyala/fasthttp/pull/2321
- refactor: improve internal interface names by @Harshal96 in https://github.com/valyala/fasthttp/pull/2318
- fix: lowercase error strings by @Harshal96 in https://github.com/valyala/fasthttp/pull/2320
- perf: reduce redundant scans and allocations in hot paths by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2322
- validate domain and path cookie attribute values on parse by @alhudz in https://github.com/valyala/fasthttp/pull/2315
- chore(deps): bump securego/gosec from 2.27.1 to 2.28.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2328
- chore(deps): bump actions/setup-go from 6 to 7 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2329
- fix: preserve pre-set status code in NewFastHTTPHandler by @xbrxr03 in https://github.com/valyala/fasthttp/pull/2323
- chore(deps): bump github.com/klauspost/compress from 1.19.0 to 1.19.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2331
- reject backslash '..' traversal in fs handler on windows by @alhudz in https://github.com/valyala/fasthttp/pull/2327
- fix: reject Windows alternate data stream paths in FS by @dev-willbird1936 in https://github.com/valyala/fasthttp/pull/2335
- chore(deps): bump golangci/golangci-lint-action from 9.2.1 to 9.3.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2307
- chore(deps): bump github.com/andybalholm/brotli from 1.2.1 to 1.2.2 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2308
- chore(deps): bump github.com/klauspost/compress from 1.18.6 to 1.18.7 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2309
- chore(deps): bump github.com/klauspost/compress from 1.18.7 to 1.19.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2314
- chore(deps): bump golang.org/x/sys from 0.46.0 to 0.47.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2326
- chore(deps): bump golang.org/x/crypto from 0.53.0 to 0.54.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2324
- chore(deps): bump golang.org/x/net from 0.56.0 to 0.57.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2325
- @itxaiohanglover made their first contribution in https://github.com/valyala/fasthttp/pull/2311
- @Harshal96 made their first contribution in https://github.com/valyala/fasthttp/pull/2316
- @dev-willbird1936 made their first contribution in https://github.com/valyala/fasthttp/pull/2335
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.72.0...v1.73.0
v1.72.0
- Update to go1.25 as minimal version by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2205
- client: add aggregate connection count metrics by @z9z in https://github.com/valyala/fasthttp/pull/2201
- fix(server): return ErrMissingFile when MultipartForm.File is nil by @u5surf in https://github.com/valyala/fasthttp/pull/2260
- bug: FS cache cleaner goroutine leaks when CleanStop is nil (default) (#2218), #2247 by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2271
- bug: data race on pipeline client c.chR during worker drain (#2220) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2272
- bug: TCPDialer.tcpAddrsClean() goroutine leaks — no shutdown mechanism (#2222) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2273
- bug: double concurrency counter increment in ServeConn causes counter leak (#2238) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2275
- bug: body stream leak in compression methods when response is discarded (#2244) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2276
- bug: InMemoryListener deadlock under high concurrency (#2245) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2277
- bug: fasthttpadaptor writer leak, data race, and crash on handler panic (#2246) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2278
- bug: fasthttpproxy dialers return nil DialFunc on error, causing panic (#2248) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2279
- bug: closeIdleConns TOCTOU race with serveConn idle timestamp (#2250) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2280
- bug: AppendCert/AppendCertEmbed not thread-safe (#2251) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2281
- bug: SetBodySizePoolLimit data race — plain int written without synchronization (#2252) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2282
- bug: file descriptor leak in prefork parent process (#2253) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2283
- security: SO_REUSEADDR on Windows enables port hijacking (#2254) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2284
- bug: file descriptor leak on z/OS s390x when FcntlInt fails (#2255) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2285
- bug: filesLockMap grows unboundedly, leaking memory (#2256) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2286
- security: TLS verification silently disabled for malformed addresses (#2236) by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2274
- fix(fs): remove temporary file when compression fails by @u5surf in https://github.com/valyala/fasthttp/pull/2264
- fix double release of streamed client response body by @Mereng in https://github.com/valyala/fasthttp/pull/2211
- fix(client): switch to GET on 303 redirect per RFC 9110 by @u5surf in https://github.com/valyala/fasthttp/pull/2265
- ci: re-enable gocritic deferInLoop check for non-test code by @u5surf in https://github.com/valyala/fasthttp/pull/2288
- Fix flaky race tests by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2292
- fix(lbclient): prevent deadlock when all clients are removed by @u5surf in https://github.com/valyala/fasthttp/pull/2287
- reject duplicate Content-Length in response header parser by @alhudz in https://github.com/valyala/fasthttp/pull/2294
- strip cr/lf from header keys in normalizeHeaderKey by @alhudz in https://github.com/valyala/fasthttp/pull/2295
- fix(client): guard nil waiter in decConnsCount by @SAY-5 in https://github.com/valyala/fasthttp/pull/2266
- strip semicolons from cookie setters to block attribute injection by @alhudz in https://github.com/valyala/fasthttp/pull/2298
- feat(prefork): graceful shutdown, leak fixes, hook robustness (re-open of #2180 follow-up) by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2199
- fix: prevent data race on FSCompressedFileSuffixes map by @xbrxr03 in https://github.com/valyala/fasthttp/pull/2300
- reject duplicate Transfer-Encoding in request header parser by @alhudz in https://github.com/valyala/fasthttp/pull/2303
- preserve duplicate request headers in ConvertRequest by @alhudz in https://github.com/valyala/fasthttp/pull/2305
- fix(server): close listener on serve error in ListenAndServe helpers by @fereidani in https://github.com/valyala/fasthttp/pull/2304
- validate trailer values in parseTrailer by @alhudz in https://github.com/valyala/fasthttp/pull/2301
- Avoid default content type for empty requests by @nkgotcode in https://github.com/valyala/fasthttp/pull/2296
- chore(deps): bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2210
- chore(deps): bump golang.org/x/crypto from 0.51.0 to 0.52.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2209
- chore(deps): bump golang.org/x/sys from 0.44.0 to 0.45.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2208
- chore(deps): bump golang.org/x/net from 0.54.0 to 0.55.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2207
- chore(deps): bump securego/gosec from 2.26.1 to 2.27.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2261
- chore(deps): bump securego/gosec from 2.27.0 to 2.27.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2267
- chore(deps): bump golang.org/x/sys from 0.45.0 to 0.46.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2289
- chore(deps): bump golang.org/x/crypto from 0.52.0 to 0.53.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2290
- chore(deps): bump golang.org/x/net from 0.55.0 to 0.56.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2291
- chore(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2297
- @z9z made their first contribution in https://github.com/valyala/fasthttp/pull/2201
- @Mereng made their first contribution in https://github.com/valyala/fasthttp/pull/2211
- @alhudz made their first contribution in https://github.com/valyala/fasthttp/pull/2294
- @SAY-5 made their first contribution in https://github.com/valyala/fasthttp/pull/2266
- @xbrxr03 made their first contribution in https://github.com/valyala/fasthttp/pull/2300
- @fereidani made their first contribution in https://github.com/valyala/fasthttp/pull/2304
- @nkgotcode made their first contribution in https://github.com/valyala/fasthttp/pull/2296
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.71.0...v1.72.0
v1.71.0
- feat(client): add RetryIfErrUpstream function to handle upstream information by @mdenushev in https://github.com/valyala/fasthttp/pull/2176
- Match net/http sensitive header redirect policy by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2181
- Sanitize first-line header setters to prevent CRLF injection by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2182
- server: apply ReadTimeout before first byte with ReduceMemoryUsage by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2183
- header: reject invalid trailer names by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2188
- header: reject pre-colon whitespace in request headers by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2187
- Sanitize redirect Location header to prevent CRLF injection by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2186
- server: keep hijacked reader out of pool by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2184
- Sanitize cookie setters to prevent CRLF injection by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2185
- feat: add ExpectHandler for richer Expect: 100-continue handling by @miretskiy in https://github.com/valyala/fasthttp/pull/2175
- http: reject whitespace before chunk extensions by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2193
- header: reject unsupported response Transfer-Encoding by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2192
- header: match net/http CL+TE handling by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2190
- chore(deps): bump securego/gosec from 2.25.0 to 2.26.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2195
- chore(deps): bump github.com/klauspost/compress from 1.18.5 to 1.18.6 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2196
- feat(prefork): Enhance prefork management with WatchMaster, CommandProducer, and Windows support by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2180
- @miretskiy made their first contribution in https://github.com/valyala/fasthttp/pull/2175
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.70.0...v1.71.0
v1.70.0
- Go 1.26 and golangci-lint updates by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2146
- Add WithLimit methods for uncompression by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2147
- Honor Root for fs.FS and normalize fs-style roots by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2145
- Sanitize header values in all setter paths to prevent CRLF injection by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2162
- Add ServeFileLiteral, ServeFSLiteral and SendFileLiteral by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2163
- Prevent chunk extension request smuggling by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2165
- Validate request URI format during header parsing to reject malformed requests by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2168
- HTTP1/1 requires exactly one Host header by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2164
- Strict HTTP version validation and simplified first line parsing by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2167
- Only normalize pre-colon whitespace for HTTP headers by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2172
- fs: reject '..' path segments in rewritten paths by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2173
- fasthttpproxy: reject CRLF in HTTP proxy CONNECT target by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2174
- fasthttpproxy: scope proxy auth cache to GetDialFunc by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2144
- feat: enhance performance by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2135
- export ErrConnectionClosed by @pjebs in https://github.com/valyala/fasthttp/pull/2152
- fix: detect master process death in prefork children by @meruiden in https://github.com/valyala/fasthttp/pull/2158
- return prev values by @pjebs in https://github.com/valyala/fasthttp/pull/2123
- docs: added httpgo to related projects by @MUlt1mate in https://github.com/valyala/fasthttp/pull/2169
- chore(deps): bump actions/upload-artifact from 6 to 7 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2149
- chore(deps): bump github.com/andybalholm/brotli from 1.2.0 to 1.2.1 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2170
- chore(deps): bump github.com/klauspost/compress from 1.18.2 to 1.18.3 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2129
- chore(deps): bump github.com/klauspost/compress from 1.18.3 to 1.18.4 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2140
- chore(deps): bump github.com/klauspost/compress from 1.18.4 to 1.18.5 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2166
- chore(deps): bump golang.org/x/crypto from 0.47.0 to 0.48.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2139
- chore(deps): bump golang.org/x/net from 0.48.0 to 0.49.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2128
- chore(deps): bump golang.org/x/net from 0.49.0 to 0.50.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2138
- chore(deps): bump golang.org/x/sys from 0.39.0 to 0.40.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2125
- chore(deps): bump golang.org/x/sys from 0.40.0 to 0.41.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2137
- chore(deps): bump securego/gosec from 2.22.11 to 2.23.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2142
- Update securego/gosec from 2.23.0 to 2.25.0 by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2161
- @MUlt1mate made their first contribution in https://github.com/valyala/fasthttp/pull/2169
- @meruiden made their first contribution in https://github.com/valyala/fasthttp/pull/2158
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.69.0...v1.70.0
v1.69.0
- Add sortkeys by @pjebs in https://github.com/valyala/fasthttp/pull/2118
- Expose header parsing error variables by @ReneWerner87 in https://github.com/valyala/fasthttp/pull/2096
- Add documentation that modifying during iteration can panic by @erikdubbelboer in https://github.com/valyala/fasthttp/pull/2122
- update readme by @pjebs in https://github.com/valyala/fasthttp/pull/2114
- chore(deps): bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2092
- chore(deps): bump golangci/golangci-lint-action from 8 to 9 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2095
- chore(deps): bump golang.org/x/sys from 0.37.0 to 0.38.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2094
- chore(deps): bump golang.org/x/crypto from 0.43.0 to 0.44.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2098
- chore(deps): bump golang.org/x/net from 0.46.0 to 0.47.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2097
- chore(deps): bump golang.org/x/crypto from 0.44.0 to 0.45.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2099
- chore(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2101
- chore(deps): bump github.com/klauspost/compress from 1.18.1 to 1.18.2 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2103
- chore(deps): bump golang.org/x/net from 0.47.0 to 0.48.0 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2109
- chore(deps): bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2111
- chore(deps): bump securego/gosec from 2.22.10 to 2.22.11 by @dependabot[bot] in https://github.com/valyala/fasthttp/pull/2110
Full Changelog: https://github.com/valyala/fasthttp/compare/v1.68.0...v1.69.0