Juan Calderon-Perez
c65df17d93
Skip linux test if running Windows
2024-12-10 11:24:58 -05:00
Juan Calderon-Perez
42e4a1a1d9
Do not prefix with /
2024-12-10 00:48:33 -05:00
Juan Calderon-Perez
d8e225cf37
Add separate test for windows
2024-12-10 00:35:50 -05:00
Juan Calderon-Perez
cc6ed88cf4
Add more checks. Add extensive testing of traversal paths
2024-12-08 23:47:51 -05:00
Juan Calderon-Perez
abdff10536
Merge branch 'main' into main
2024-12-08 19:55:29 -05:00
Juan Calderon-Perez
4347857372
Merge pull request #3234 from gofiber/dependabot/github_actions/codecov/codecov-action-5.1.1
...
build(deps): bump codecov/codecov-action from 5.0.7 to 5.1.1
2024-12-06 08:58:05 -05:00
dependabot[bot]
1e38dbf345
build(deps): bump codecov/codecov-action from 5.0.7 to 5.1.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.0.7 to 5.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v5.0.7...v5.1.1 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-12-06 12:12:43 +00:00
Kashiwa
89a0cd3fa5
🔥 feat: Add support for graceful shutdown timeout in ListenConfig ( #3220 )
...
* 🔥 feat: Add support for graceful shutdown timeout in Listen
* 📚 doc: update the description of GracefulShutdownTimeout
* ♻️ refact: use require.ErrorIs instead of require.Equal
* fix: Target error should be in err chain by using fasthttputil.ErrInmemoryListenerClosed
* ♻️ refact: use require.ErrorIs instead of require.Equal
* 📚 doc: update the description of GracefulShutdownTimeout
* ♻️ refact: rename GracefulShutdownTimeout to ShutdownTimeout
* 🩹 fix: set default ShutdownTimeout to 10s
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-12-04 13:55:36 +01:00
René
9a2ceb7220
fix duplicated benchmark name problem
2024-12-01 15:30:45 +01:00
René
689537a0d2
fix duplicated benchmark name problem
2024-12-01 15:14:32 +01:00
M. Efe Çetin
77622700d7
chore: mark go1.23 as minimum go version ( #3226 )
2024-12-01 14:39:49 +01:00
Hao Chun Chang
67021360e1
🔥 Feature: Add AllLogger to Config ( #3153 )
...
* 🔥 Feature: Add SetFlags to Logger Interface
🔥 Feature: Add fiberlog Logger field to config
* 🚨 Test: custom-defined Logger and LoggerFunc
* 📚 Doc: add LoggerFunc and Logger to middleware logger
* 🚨 Test: fine-tune custom Logger and LoggerFunc
* 📚 Doc: add Logger documentation
📚 Doc: add custom Logger example
* 🩹 fix: add default Logger field to default config
* 📚 Doc: remove Logger field in middleware logger
📚 Doc: add example of using fiber logger interface
* 🚨 Test: add tests for using fiber logger interface wrapper
* 📚 Doc: update custom logger example
* Update docs/middleware/logger.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* update
* update logger docs
* update what's new
* replace setflags with getloggerinstance
* fix linter
* update
* Fix markdownlint issues
* apply reviews & improve coverage
* fix linter
* rename controllogger
* Update whats_new.md
expandable example
---------
Co-authored-by: RW <rene@gofiber.io>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Muhammed Efe Cetin <efectn@protonmail.com>
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-12-01 13:32:52 +01:00
René
f31ec351c7
Update constants.md documentation
2024-12-01 13:17:38 +01:00
RW
60dfd6b313
Update constants.md
...
fix syntax
2024-12-01 13:04:14 +01:00
Sumit Kumar
26cc477500
🔥 feat: Add support for CBOR encoding ( #3173 )
...
* feat(cbor): allow encoding response bodies in cbor
* fix(tests::cbor): encode struct instead of a randomly ordered hashmap
* docs(whats_new): add cbor in context section
* feat(binder): introduce CBOR
* feat(client): allow cbor in fiber client
* chore(tests): add more test
* chore(packages): go mod tidy
* fix(binder): update CBOR name and test
* improve test coverage
* improve test coverage
* update1
* add docs
* doc fixes
* update
* Fix markdown lint
* Add missing entry from binder README
* add/refresh documentation
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
Co-authored-by: RW <rene@gofiber.io>
2024-12-01 11:03:50 +01:00
René
89452fea32
Update whats_new.md documentation
2024-11-29 16:12:15 +01:00
René
86fd29ac27
Update whats_new.md documentation
2024-11-29 16:04:10 +01:00
René
6a36f6d4e6
Update whats_new.md documentation
2024-11-29 15:56:31 +01:00
RW
1bfbb5056c
Update README.md
...
fix donation image sizes
2024-11-28 09:51:39 +01:00
Giovanni Rivera
31a503f699
🔥 Feature (v3): Add buffered streaming support ( #3131 )
...
* 🔥 Feature: Add SendStreamWriter to Ctx
Create a new `*DefaultCtx` method called `SendStreamWriter()`
that maps to fasthttp's `Response.SetBodyStreamWriter()`
* 🚨 Test: Validate regular use of c.SendStreamWriter()
- Adds Test_Ctx_SendStreamWriter to ctx_test.go
* 🚨 Test: (WIP) Validate interrupted use of c.SendStreamWriter()
- Adds Test_Ctx_SendStreamWriter_Interrupted to ctx_test.go
- (Work-In-Progress) This test verifies that some data is
still sent before a client disconnects when using the method
`c.SendStreamWriter()`.
**Note:** Running this test reports a race condition when using
the `-race` flag or running `make test`. The test uses a channel
and mutex to prevent race conditions, but still triggers a warning.
* 📚 Doc: Add `SendStreamWriter` to docs/api/ctx.md
* 🩹 Fix: Remove race condition in Test_Ctx_SendStreamWriter_Interrupted
* 🎨 Styles: Update ctx_test.go to respect golangci-lint
* 📚 Doc: Update /docs/api/ctx.md to show proper `w.Flush()` error handling
* 📚 Doc: Add SendStreamWriter details to docs/whats_new.md
* 🎨 Styles: Update /docs/whats_new.md to respect markdownlint-cli2
* 🩹 Fix: Fix Fprintf syntax error in docs/whats_new.md
---------
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
2024-11-27 11:11:56 +01:00
Juan Calderon-Perez
ff55cfd7c7
Merge pull request #3217 from gofiber/dependabot/go_modules/github.com/stretchr/testify-1.10.0
...
build(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0
2024-11-25 07:51:04 -05:00
dependabot[bot]
41f7497e17
build(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0
...
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify ) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases )
- [Commits](https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0 )
---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 12:25:34 +00:00
Mitul Agrawal
359343625b
🔥 feat: Add support for creating Fiber client from existing FastHTTP client ( #3214 )
...
* add support to create client from existing client
* add NewWithClient to documentation
* fix typo in comment
* fix and shorten comment
* add unit test for NewWithClient
* add nil check and test
* fix lint check
2024-11-25 11:54:07 +01:00
ItsMeSamey
f08ebf4335
🐛 fix: Nil pointer dereference with Must Bind binding ( #3171 )
...
* Fix nil pointer dereference with Must Bind binding error
if err is nil err.Error() panics
(eg. c.Bind().Must().JSON(...) successfully binds but panics
* Added returnErr test
make sure returnErr works with nil error
* Reordered returnErr nil check
as in majority of cases we expect err to be nil, this should provide better short-cutting
* Use require.NoError
* Update bind_test.go
* Renamed Must to WithAutoHandling
* Update bind.md
Added a requested clarification
* renamed Should to WithoutAutoHandling and Bind.should to Bind.dontHandle
* renamed dontHandle to dontHandleErrs
* fixed formatting
* fixed a typo
* Update binder documentation
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-11-25 11:51:36 +01:00
Giovanni Rivera
f8b490f89e
🔥 Feature: Add TestConfig to app.Test() for configurable testing ( #3161 )
...
* 🔥 Feature: Add thread-safe reading from a closed testConn
* 🔥 Feature: Add TestConfig to app.Test()
This commit is summarized as:
- Add the struct `TestConfig` as a parameter for `app.Test()` instead of `timeout`
- Add documentation of `TestConfig` to docs/api/app.md and in-line
- Modify middleware to use `TestConfig` instead of the previous implementation
Fixes #3149
* 📚 Doc: Add more details about TestConfig in docs
* 🩹 Fix: Correct testConn tests
- Fixes Test_Utils_TestConn_Closed_Write
- Fixes missing regular write test
* 🎨 Style: Respect linter in Add App Test Config
* 🎨 Styles: Update app.go to respect linter
* ♻️ Refactor: Rename TestConfig's ErrOnTimeout to FailOnTimeout
- Rename TestConfig.ErrOnTimeout to TestConfig.FailOnTimeout
- Update documentation to use changed name
- Also fix stale documentation about passing Timeout as a
single argument
* 🩹 Fix: Fix typo in TestConfig struct comment in app.go
* ♻️ Refactor: Change app.Test() fail on timeouterror to os.ErrDeadlineExceeded
* ♻️ Refactor:Update middleware that use the same TestConfig to use a global variable
* 🩹 Fix: Update error from FailOnTimeout to os.ErrDeadlineExceeded in tests
* 🩹 Fix: Remove errors import from middlware/proxy/proxy_test.go
* 📚 Doc: Add `app.Test()` config changes to docs/whats_new.md
* ♻ Refactor: Change app.Test() and all uses to accept 0 as no timeout instead of -1
* 📚 Doc: Add TestConfig option details to docs/whats_new.md
* 🎨 Styles: Update docs/whats_new.md to respect markdown-lint
* 🎨 Styles: Update docs/whats_new.md to use consistent style for TestConfig options description
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-11-22 08:43:38 +01:00
Juan Calderon-Perez
b6ecd638e9
Merge pull request #3213 from gofiber/dependabot/github_actions/codecov/codecov-action-5.0.7
...
build(deps): bump codecov/codecov-action from 5.0.4 to 5.0.7
2024-11-21 07:38:37 -05:00
dependabot[bot]
5697b9d45e
build(deps): bump codecov/codecov-action from 5.0.4 to 5.0.7
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.0.4 to 5.0.7.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v5.0.4...v5.0.7 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 12:31:46 +00:00
Juan Calderon-Perez
b17093b2c8
Merge pull request #3210 from gofiber/dependabot/github_actions/codecov/codecov-action-5.0.4
...
build(deps): bump codecov/codecov-action from 5.0.2 to 5.0.4
2024-11-20 08:03:27 -05:00
dependabot[bot]
329759db51
build(deps): bump codecov/codecov-action from 5.0.2 to 5.0.4
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.0.2 to 5.0.4.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v5.0.2...v5.0.4 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 12:49:06 +00:00
Juan Calderon-Perez
f13b713f0d
Merge pull request #3209 from gofiber/dependabot/github_actions/codecov/codecov-action-5.0.2
...
build(deps): bump codecov/codecov-action from 5.0.0 to 5.0.2
2024-11-18 08:07:23 -05:00
dependabot[bot]
7ac82d7b09
build(deps): bump codecov/codecov-action from 5.0.0 to 5.0.2
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.0.0 to 5.0.2.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v5.0.0...v5.0.2 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 12:41:49 +00:00
Juan Calderon-Perez
ba83a6e1ce
📚 Doc: Updates to Context documentation ( #3206 )
...
* Update context documentation
* Update docs/api/ctx.md
---------
Co-authored-by: RW <rene@gofiber.io>
2024-11-18 10:10:59 +01:00
Juan Calderon-Perez
a12ca10cac
📚 Doc: Updates to API documentation and README ( #3205 )
...
* Updates to documentation
* Update .github/README.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Remove trailing spaces
* Updates based on PR comments
* Update docs/api/bind.md
* Update docs/api/redirect.md
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: RW <rene@gofiber.io>
2024-11-16 15:24:14 +01:00
JIeJaitt
f725ded92b
🔥 feat: Add Context Support to RequestID Middleware ( #3200 )
...
* Rename UserContext() to Context(). Rename Context() to RequestCtx()
* feat: add requestID in UserContext
* Update Ctxt docs and What's new
* Remove extra blank lines
* ♻️ Refactor: merge issue #3186
* 🔥 Feature: improve FromContext func and test
* 📚 Doc: improve requestid middleware
* ♻️ Refactor: Rename interface to any
* fix: Modify structure sorting to reduce memory usage
---------
Co-authored-by: Juan Calderon-Perez <jgcalderonperez@protonmail.com>
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-11-15 17:34:20 +01:00
dependabot[bot]
2c242e70c7
build(deps): bump DavidAnson/markdownlint-cli2-action from 17 to 18 ( #3208 )
...
Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action ) from 17 to 18.
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases )
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v17...v18 )
---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-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-11-15 15:14:58 +01:00
dependabot[bot]
60932d3d56
build(deps): bump codecov/codecov-action from 4.6.0 to 5.0.0 ( #3207 )
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.6.0 to 5.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v4.6.0...v5.0.0 )
---
updated-dependencies:
- dependency-name: codecov/codecov-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-11-15 15:14:49 +01:00
Juan Calderon-Perez
16f9056f5f
🐛 fix: Improve naming convention for Context returning functions ( #3193 )
...
* Rename UserContext() to Context(). Rename Context() to RequestCtx()
* Update Ctxt docs and What's new
* Remove extra blank lines
---------
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
2024-11-13 16:12:19 +01:00
Juan Calderon-Perez
7cddb84b21
📚 Doc: Update intro documentation ( #3204 )
...
Auto update intro documentation
2024-11-13 13:11:09 +01:00
Karen
2c7bdb9fd1
🩹 fix: Close File After SaveFileToStorage ( #3197 )
...
* fix: close file after opening in SaveFileToStorage to prevent resource leaks
* ♻️ refactor: simplify file close logic
* Update ctx.go
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-11-12 02:47:22 +01:00
Juan Calderon-Perez
dcdd2eb2c6
Bump golangci-lint to v1.62.0 ( #3196 )
2024-11-11 10:37:27 +01:00
Juan Calderon-Perez
14cbaa0744
Merge branch 'main' into main
2024-11-06 08:58:58 -05:00
Juan Calderon-Perez
7126e484c9
Merge pull request #3183 from gofiber/dependabot/go_modules/github.com/valyala/fasthttp-1.57.0
...
build(deps): bump github.com/valyala/fasthttp from 1.56.0 to 1.57.0
2024-11-06 08:57:43 -05:00
dependabot[bot]
87faed717f
build(deps): bump github.com/valyala/fasthttp from 1.56.0 to 1.57.0
...
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp ) from 1.56.0 to 1.57.0.
- [Release notes](https://github.com/valyala/fasthttp/releases )
- [Commits](https://github.com/valyala/fasthttp/compare/v1.56.0...v1.57.0 )
---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 12:58:50 +00:00
dependabot[bot]
9eee2923a5
build(deps): bump github.com/tinylib/msgp from 1.2.3 to 1.2.4 ( #3185 )
...
Bumps [github.com/tinylib/msgp](https://github.com/tinylib/msgp ) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/tinylib/msgp/releases )
- [Commits](https://github.com/tinylib/msgp/compare/v1.2.3...v1.2.4 )
---
updated-dependencies:
- dependency-name: github.com/tinylib/msgp
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 13:57:47 +01:00
dependabot[bot]
da605b44a7
build(deps): bump github.com/tinylib/msgp from 1.2.1 to 1.2.3 ( #3182 )
...
Bumps [github.com/tinylib/msgp](https://github.com/tinylib/msgp ) from 1.2.1 to 1.2.3.
- [Release notes](https://github.com/tinylib/msgp/releases )
- [Commits](https://github.com/tinylib/msgp/compare/v1.2.1...v1.2.3 )
---
updated-dependencies:
- dependency-name: github.com/tinylib/msgp
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 07:48:25 -04:00
xEricL
579d9a3f3d
📚 Doc: Clarify SendFile Docs ( #3172 )
...
* 📚 Doc: Clarify SendFile ContentType header set by file format
* 📚 Doc: Make SendFile default value formatting consistent
* 📚 Doc: Add missing `fiber.` in SendFile usage docs
* 📚 Doc: Hyphenate 'case-sensitive'
* 📚 Doc: Clarify `SendFile` behavior for missing/invalid file extensions
* 🚨 Test: Validate `SendFile` Content-Type header
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-10-28 08:11:24 +01:00
Juan Calderon-Perez
9a727043e6
Merge pull request #3174 from gofiber/dependabot/go_modules/github.com/gofiber/utils/v2-2.0.0-beta.7
...
build(deps): bump github.com/gofiber/utils/v2 from 2.0.0-beta.6 to 2.0.0-beta.7
2024-10-25 23:55:21 -04:00
Juan Calderon-Perez
5d811d8505
Merge pull request #3177 from gofiber/dependabot/github_actions/benchmark-action/github-action-benchmark-1.20.4
...
build(deps): bump benchmark-action/github-action-benchmark from 1.20.3 to 1.20.4
2024-10-25 23:54:58 -04:00
Juan Calderon-Perez
454c166689
Merge pull request #3181 from alequilesl/patch-1
...
Doc: balance brakets
2024-10-25 23:53:52 -04:00
alequilesl
3367ecfa5b
balance brakets
2024-10-25 22:28:07 -04:00