Commit Graph

16 Commits

Author SHA1 Message Date
RW 66bc61ee64 Add an option to allow empty root in the fsHandler (#1299)
* Add an option to allow empty root in the fsHandler

this is necessary to restore the capabilities before the commit https://github.com/valyala/fasthttp/commit/c7576cc10cabfc9c993317a2d3f8355497bea156
and to allow further functionality to be docked from the outside which is not affected by setting the root dir afterwards

https://github.com/gofiber/fiber/pull/1882#issuecomment-1120832500

* Add an option to allow empty root in the fsHandler

this is necessary to restore the capabilities before the commit https://github.com/valyala/fasthttp/commit/c7576cc10cabfc9c993317a2d3f8355497bea156
and to allow further functionality to be docked from the outside which is not affected by setting the root dir afterwards

https://github.com/gofiber/fiber/pull/1882#issuecomment-1120832500

* Update fs.go

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

* Update fs.go

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

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
2022-05-16 12:33:47 +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 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 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