Commit Graph

20 Commits

Author SHA1 Message Date
Craig O'Donnell 31fdc796f4 resolve CVE-2022-27664 (#1377) 2022-09-15 23:02:06 +02:00
Aoang a696949f6c Deprecate Go 1.15 (#1379)
* Dropping support for 1.15.

* Replaces Go 1.16 Deprecated functions

* Update test build flag

* Fix import sort and comment

* Update github.com/klauspost/compress to v1.15.9

https://github.com/klauspost/compress improved performance and changed Minimum version is 1.16, this should be the final supported release for Go 1.16 (https://github.com/klauspost/compress/commit/6d0019a95afa3221f7522d1f2eed0033b5e79470) .
2022-09-15 22:28:25 +03:00
Erik Dubbelboer d4c739eee5 State active (#1260)
* Require at least Go 1.15

* Fix StateActive state

* Don't panic when idle connections get closed
2022-04-01 10:18:48 +02:00
Mikhail Faraponov 59f94a3f71 Update github.com/klauspost/compress (#1237) 2022-03-06 13:33:58 +01:00
Mikhail Faraponov 856ca8e7aa Update dependencies (#1230) 2022-02-28 20:51:08 +01:00
Mikhail Faraponov 9d665e00df Update dependencies (#1204)
Co-authored-by: Mikhail Faraponov <mikefaraponov@Mikhails-MacBook-Pro.local>
2022-02-01 13:09:04 +01:00
Mikhail Faraponov 9123060b3a Updated dependencies (#1194)
Co-authored-by: Mikhail Faraponov <mikefaraponov@Mikhails-MacBook-Pro.local>
2022-01-14 05:01:51 +01:00
Mikhail Faraponov 97e1319927 Update compress (#1069) 2021-08-16 18:09:31 +02:00
Sergio Andrés Virviescas Santana fa3e5d85f2 Run test with go 1.16.X (#1028)
* Run test with go 1.16.X

* Fix min required go version

* Add go tip

* Update .github/workflows/security.yml

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2021-05-17 10:45:11 +02:00
Sergio Andrés Virviescas Santana 5898006f5b Upgrade dependencies and tidy (#1029) 2021-05-17 09:12:49 +02:00
Erik Dubbelboer 4637395dd7 Update deps 2021-02-26 12:04:52 +01:00
Maxim Korolyov 4eac1ae470 Added proxy from env support (#885)
* added proxy from env support

* fixed package name

* fixed err wrapping

* evoid 2 err wrapping in the same format
2020-10-25 14:46:54 +01:00
Erik Dubbelboer f97a382d80 Add letsencrypt example 2020-07-11 20:40:19 +02:00
Erik Dubbelboer cc9db3ab20 Try TravisCI Windows (#828)
* Try TravisCI Windows

* prefork is supported on windows with Reuseport=true

* Bit longer timeouts for tests
2020-06-06 15:57:38 +02:00
Andy Pan 33b3cb259e Support Windows SO_REUSEADDR (#822)
* Support Windows SO_REUSEADDR

* Update the comment

* Renew comment of the Listen method on Windows
2020-06-04 16:51:39 +02:00
Erik Dubbelboer 339ad36634 Add Brotli support
New Functions:

    CompressHandlerBrotliLevel(h RequestHandler, brotliLevel, otherLevel int) RequestHandler
    Request.BodyUnbrotli() ([]byte, error)
    Response.BodyUnbrotli() ([]byte, error)
    AppendBrotliBytesLevel(dst, src []byte, level int) []byte
    WriteBrotliLevel(w io.Writer, p []byte, level int) (int, error)
    WriteBrotli(w io.Writer, p []byte) (int, error)
    AppendBrotliBytes(dst, src []byte) []byte
    WriteUnbrotli(w io.Writer, p []byte) (int, error)
    AppendUnbrotliBytes(dst, src []byte) ([]byte, error)

New Constants:

    CompressBrotliNoCompression
    CompressBrotliBestSpeed
    CompressBrotliBestCompression
    CompressBrotliDefaultCompression

Brotli compression levels are different from gzip/flate. Because of this we have separate level constants and CompressHandlerBrotliLevel takes 2 levels.

I didn't add Brotli support to CompressHandler as this could cause a spike in CPU usage when users upgrade fasthttp.

fasthttp.CompressBrotliDefaultCompression is not the same as
brotli.DefaultCompression. brotli.DefaultCompression is more than twice
as slow as fasthttp.CompressBrotliDefaultCompression which I thought was
unreasonable as default.
2020-05-15 15:36:26 +02:00
Erik Dubbelboer 96a8ad6e00 Upgrade dependencies 2020-04-20 18:21:58 +02:00
Erik Dubbelboer e6a8bcfb0c Add go version to go.mod, test with 1.13.1
I chose 1.11 for the version in the go.mod file based on the information
in this issue: https://github.com/golang/go/issues/30791
2019-09-28 10:10:20 +02:00
Erik Dubbelboer 7e6a4c887b Update dependencies 2019-09-07 10:20:54 +02:00
Oleg Kovalov 4087354082 Support Go modules 2018-10-01 15:33:33 +08:00