aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
4 daysfeat: add address to tryDial errors (#1763)HEADmasterGravatar Max Denushev 1-6/+41
* fix: propagate body stream error to close function (#1743) * feat: add address in ErrDialTimeout * feat: add address in any `tryDial` error * feat: use struct to wrap error with upstream info * fix: lint * fix: wrapped Error() method * docs: add example to ErrDialWithUpstream * feat: add address in ErrDialTimeout * feat: add address in any `tryDial` error * feat: use struct to wrap error with upstream info * fix: lint * fix: wrapped Error() method * docs: add example to ErrDialWithUpstream * docs: fix example for ErrDialWithUpstream --------- Co-authored-by: Max Denushev <denushev@tochka.com>
7 daysImplemented what was described by me in #1766. (#1767)Gravatar Limux 1-0/+6
* Implemented what was described by me in issue#1766. * fixed linting isssues in fs.go with gofmt -e -d -s --------- Co-authored-by: Raphael Habichler <raphael.habichler@bmd.at>
7 daysAdd perIPTLSConn to support MaxConnsPerIP with tls connectionsGravatar Erik Dubbelboer 2-9/+39
Otherwise calling RequestCtx.TLSConnectionState() will fail. Fixes #1770
7 daysDon't allow , in host when using Client (#1761)Gravatar Erik Dubbelboer 1-0/+5
When using a url like http://example.com,/ URI will parse "example.com," as host. HostClient then splits this by "," into multiple addresses and will connect to example.com. HostClient splitting the address by "," is only for direct use, not for use with Client.
11 dayschore(deps): bump golangci/golangci-lint-action from 4 to 5 (#1769)Gravatar dependabot[bot] 1-1/+1
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22fix: propagate body stream error to close function (#1743) (#1757)Gravatar Max Denushev 3-31/+51
* fix: propagate body stream error to close function (#1743) * fix: http test * fix: close body stream with error in encoding functions * fix: lint --------- Co-authored-by: Max Denushev <denushev@tochka.com>
2024-04-21refactor: do not return error as it is always nil (#1759)Gravatar Oleksandr Redko 2-33/+25
2024-04-10Add macos-14 platform, enable shuffle of tests (#1746)Gravatar Juan Calderon-Perez 1-3/+3
2024-04-08add support for CHIPS (Cookies Having Independent Partitioned State) (#1752)Gravatar Gürkan Yeşilyurt 3-4/+60
* add support for CHIPS (Cookies Having Independent Partitioned State) * fix comment lines * Update cookie.go fix lint error: should omit comparison to bool constant
2024-04-04chore(deps): bump golang.org/x/net from 0.22.0 to 0.23.0 (#1748)Gravatar dependabot[bot] 2-3/+3
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02test: replace panic with returning error (#1747)Gravatar Oleksandr Redko 1-8/+4
2024-03-29fix: panic in ParseIPv4 when len(dst) > 4 (#1742)Gravatar Oleksandr Redko 2-15/+17
2024-03-28test: remove redundant error check (#1741)Gravatar Oleksandr Redko 2-2/+7
2024-03-25refactor: rename error local variables (#1738)Gravatar Oleksandr Redko 3-22/+22
2024-03-06Update depsGravatar Erik Dubbelboer 2-12/+12
2024-03-02Enable perfsprint linter; fix up lint issues (#1727)Gravatar Oleksandr Redko 9-25/+27
2024-03-02test: remove `//nolint:govet` comments (#1729)Gravatar Oleksandr Redko 4-16/+16
2024-03-02Enable few gocritic checks; fix up issues (#1728)Gravatar Oleksandr Redko 10-21/+18
2024-02-27chore(deps): bump golang.org/x/crypto from 0.19.0 to 0.20.0 (#1725)Gravatar dependabot[bot] 2-13/+3
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.19.0 to 0.20.0. - [Commits](https://github.com/golang/crypto/compare/v0.19.0...v0.20.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21feat:support zstd compress and uncompressed (#1701)Gravatar Co1a 9-18/+435
* feat:support zstd compress and uncompressed * fix:real & stackless write using different pool to avoid get stackless.writer * fix:zstd normalize compress level * Change empty string checks to be more idiomatic (#1684) * chore:lint fix and rebase with master * chore:remove 1.18 test & upgrade compress version * fix:error default compress level * Fix lint --------- Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2024-02-21Limit memory for fuzz testingGravatar Erik Dubbelboer 1-4/+6
CIFuzz has low memory limits that we keep hitting without there being an issue.
2024-02-21Upgrade golangci-lint to v1.56.2; fix gocritic issues (#1722)Gravatar Oleksandr Redko 16-38/+53
2024-02-21Remove unnecessary build tag go1.21 (#1721)Gravatar Oleksandr Redko 2-2/+2
2024-02-17adaptor ResponseWriter - adding Hijack method and pass proper fields (#1525)Gravatar gilwo 2-2/+121
* adding hijack method and pass proper fields * adding hijack method and pass proper fields - adding tests * improve hijack handling, use proper test for hijacking * extend hijackhandler propogation to NewFastHTTPHandlerFunc * align hijacking of fasthttp adaptor net request with fasthttp request, safe conn handling for proper release of resources and custom hijack handler for more controlled by hijacking implementation * Implement actual behaviour of net/http Hijacker --------- Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2024-02-13chore(deps): bump securego/gosec from 2.18.2 to 2.19.0 (#1720)Gravatar dependabot[bot] 1-1/+1
Bumps [securego/gosec](https://github.com/securego/gosec) from 2.18.2 to 2.19.0. - [Release notes](https://github.com/securego/gosec/releases) - [Changelog](https://github.com/securego/gosec/blob/master/.goreleaser.yml) - [Commits](https://github.com/securego/gosec/compare/v2.18.2...v2.19.0) --- updated-dependencies: - dependency-name: securego/gosec dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-11Prevent request smuggling (#1719)v1.52.0Gravatar Erik Dubbelboer 2-5/+27
* Prevent request smuggling Prevent request smuggling when fasthttp is behind a reverse proxy that might interprets headers differently by being stricter. Should also prevent request smuggling when fasthttp is used as the reverse proxy. * Make header value comparison case-insensitive
2024-02-11Follow RFCs 7230 and 9112 for HTTP versions (#1710)Gravatar Erik Dubbelboer 4-32/+34
Require that HTTP versions match the following pattern: HTTP/[0-9]\.[0-9]
2024-02-10Bump dependencies (#1718)Gravatar Erik Dubbelboer 2-5/+15
2024-02-10bump securego/gosec from 2.17.0 to 2.18.2Gravatar Erik Dubbelboer 1-2/+2
2024-02-10chore(deps): bump golangci/golangci-lint-action from 3 to 4 (#1711)Gravatar dependabot[bot] 1-1/+1
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-10Update all github actions, add go1.22 (#1707)Gravatar Juan Calderon-Perez 5-7/+17
2024-02-10Implement `GetRejectedConnectionsCount` function (#1704)Gravatar mopeneko 2-0/+66
* Implement `GetRejectedConnectionsCount` * Implement test for `GetRejectedConnectionsCount`
2024-02-10add DisableDNSResolution for TCPDialer. Sometimes, users do not need to use ↵Gravatar Zhengkai Wang 1-10/+15
DNS resolution because they have already determined that the requested address is a list of IP addresses. (#1702) Co-authored-by: wangzhengkai.wzk <wangzhengkai.wzk@alibaba-inc.com>
2024-01-30Try fixing oss-fuzz running out of memory and skipping a lotGravatar Erik Dubbelboer 1-6/+4
2024-01-20Make Fuzz tests deterministicGravatar Erik Dubbelboer 1-32/+21
From the Go docs: - Fuzz targets should be fast and deterministic so the fuzzing engine can work efficiently, and new failures and code coverage can be easily reproduced. - Since the fuzz target is invoked in parallel across multiple workers and in nondeterministic order, the state of a fuzz target should not persist past the end of each call, and the behavior of a fuzz target should not depend on global state.
2024-01-18update build tag (#1695)Gravatar tyltr 2-2/+2
* update go.sum * update build tag
2024-01-16Put a limit on the max body size for fuzzingGravatar Erik Dubbelboer 1-0/+8
2024-01-14Bump supported Go version in readme (#1690)Gravatar Erik Dubbelboer 1-1/+1
2024-01-09Move Fuzz tests into their own fileGravatar Erik Dubbelboer 5-87/+93
This is required for https://github.com/google/oss-fuzz/pull/11453
2024-01-07refactor: move manually created tchar table to bytesconv_table_gen (#1689)Gravatar nickajacks1 3-22/+26
2024-01-07Add CIFuzz (#1443)Gravatar AdamKorcz 1-0/+26
Adds a workflow to run fasthttp's fuzzers in the CI.
2024-01-06test: migrate remaining fuzzit tests to go 1.18 fuzzing (#1687)Gravatar nickajacks1 5-75/+45
2024-01-06test(expvarhandler): fix failure when using -count to run more than once (#1688)Gravatar nickajacks1 1-3/+10
2024-01-04Change empty string checks to be more idiomatic (#1684)Gravatar Oleksandr Redko 8-14/+17
2024-01-04chore: move cookie fuzz test to go 1.18 fuzzing (#1686)Gravatar nickajacks1 3-25/+23
2024-01-02feat: add function to parse HTTP header parameters (#1685)Gravatar nickajacks1 3-0/+180
* feat: add function to parse HTTP header parameters The implementation is based on RFC-9110 5.6.6. * test: add fuzz for VisitHeaderParams
2023-12-19chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#1678)Gravatar dependabot[bot] 2-9/+9
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13chore: Add missing dots at the end of comments (#1677)Gravatar Oleksandr Redko 18-126/+139
2023-12-05chore: Set max line length to 130 characters (#1676)Gravatar Oleksandr Redko 5-14/+42
2023-12-02writeBodyFixedSize: Only do an early flush if the reader is an *os.File (#1674)Gravatar Jille Timmermans 1-4/+13
or an *io.LimitedReader of an *os.File (because that's also supported by https://cs.opensource.google/go/go/+/refs/tags/go1.21.4:src/bufio/bufio.go;l=784) I think that having to flush less often outweighs the overhead of the extra check. The appended data is known to be large, but it might still save us a syscall by allowing it to buffer more.