4279 Commits

Author SHA1 Message Date
Juan Calderon-Perez
b533ac7792 docs: note proxy KeepConnectionHeader 2025-07-25 00:55:40 -04:00
Juan Calderon-Perez
aa87c11903
🧹 chore: Replace math/rand with crypto/rand (#3508)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-23 16:28:16 +02:00
Copilot
36d9f394a0
🔥 feat: Add default UTF-8 charset (#3583)
Co-authored-by: ReneWerner87 <7063188+ReneWerner87@users.noreply.github.com>
Co-authored-by: gaby <835733+gaby@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: RW <rene@gofiber.io>
2025-07-23 16:27:03 +02:00
RW
30dee26ac1
Skip unstable GenericParseType benchmarks (#3614) 2025-07-21 15:38:09 +02:00
Juan Calderon-Perez
b090e16592
🧹 chore: Add tests for quoteRawString (#3613) 2025-07-21 15:23:43 +02:00
Juan Calderon-Perez
7da56030db
🐛 bug: Fix retry config handling (#3609) 2025-07-21 13:14:01 +02:00
Juan Calderon-Perez
361d76c37d
🐛 bug: Fix MIME type equality checks (#3602) v3.0.0-beta.5 2025-07-20 16:38:31 +02:00
RW
ea66fe2497
Update app.go
prepare release v3.0.0-beta.5
2025-07-20 16:10:33 +02:00
RW
05f8ac0255
🔥 feat: Add config for Timeout middleware (#3604)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-20 15:22:08 +02:00
RW
5dffcb6d84
[Static]: Improve sanitizePath performance (#3601) 2025-07-20 13:50:44 +02:00
Juan Calderon-Perez
93be63c229
🧹 chore: Improve static middleware security (#3595) 2025-07-20 10:35:53 +02:00
RW
f4ad1185ff
Update whats_new.md 2025-07-19 20:59:14 +02:00
Jason McNeil
e17bab7946
Refactor CSRF middleware and enhance documentation (#3598)
Co-authored-by: RW <rene@gofiber.io>
2025-07-19 20:11:33 +02:00
Juan Calderon-Perez
35e707b3d5
🐛 bug: Fix handling of negative BodyLimit (#3599) 2025-07-19 19:21:42 +02:00
René
d5842860eb fix Benchmark_MemoryLock
panic: runtime error: index out of range [1] with length 1

goroutine 67 [running]:
github.com/gofiber/fiber/v3/middleware/idempotency_test.Benchmark_MemoryLock(0xc00012c2c8)
	/home/runner/work/fiber/fiber/middleware/idempotency/locker_test.go:74 +0x23d
testing.(*B).runN(0xc00012c2c8, 0x1)
	/opt/hostedtoolcache/go/1.24.4/x64/src/testing/benchmark.go:219 +0x190
testing.(*B).run1.func1()
	/opt/hostedtoolcache/go/1.24.4/x64/src/testing/benchmark.go:245 +0x48
created by testing.(*B).run1 in goroutine 1
	/opt/hostedtoolcache/go/1.24.4/x64/src/testing/benchmark.go:238 +0x90
exit status 2
2025-07-18 08:55:06 +02:00
René
16fd8edbf1 fix Benchmark_MemoryLock
panic: runtime error: index out of range [1] with length 1

goroutine 67 [running]:
github.com/gofiber/fiber/v3/middleware/idempotency_test.Benchmark_MemoryLock(0xc00012c2c8)
	/home/runner/work/fiber/fiber/middleware/idempotency/locker_test.go:74 +0x23d
testing.(*B).runN(0xc00012c2c8, 0x1)
	/opt/hostedtoolcache/go/1.24.4/x64/src/testing/benchmark.go:219 +0x190
testing.(*B).run1.func1()
	/opt/hostedtoolcache/go/1.24.4/x64/src/testing/benchmark.go:245 +0x48
created by testing.(*B).run1 in goroutine 1
	/opt/hostedtoolcache/go/1.24.4/x64/src/testing/benchmark.go:238 +0x90
exit status 2
2025-07-18 08:53:53 +02:00
M. Efe Çetin
192d1dff0d
feat: add context methods to fiber.Storage interface (#3566)
* feat: add context methods to fiber.Storage interface

* fix linter

* create new file for storage interface (storage_interface.go)

* add simple context check to internal storage

* update docs

* add fallback context for session

---------

Co-authored-by: René <rene@gofiber.io>
2025-07-18 03:19:50 +02:00
RW
2f8fdc454b
Add modernize lint (#3590) 2025-07-17 14:48:43 +02:00
Juan Calderon-Perez
09eaaf3be8
🐛 bug: Fix CookieJar domain logic (#3564) 2025-07-17 14:48:08 +02:00
Aarav Arora
2832ae32d0
🧹 chore: Simplify generic function calls (#3578) 2025-07-16 14:50:15 +02:00
dependabot[bot]
93de9c59eb
build(deps): bump github.com/valyala/fasthttp from 1.63.0 to 1.64.0 (#3586)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-15 21:16:23 +02:00
Juan Calderon-Perez
cc19248552
Merge pull request #3581 from gofiber/dependabot/go_modules/github.com/fxamacker/cbor/v2-2.9.0
build(deps): bump github.com/fxamacker/cbor/v2 from 2.8.0 to 2.9.0
2025-07-15 09:37:50 -04:00
RW
41a19e010b
🧹 chore: Refactor Opt-in support for CBOR (#3580)
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
2025-07-15 14:19:02 +02:00
RW
2fafc10194
Update Copilot docs and setup (#3585) 2025-07-15 13:02:39 +02:00
René
8503eeffca remove unneeded benchmark "Benchmark_SlashRecognition" 2025-07-15 10:35:47 +02:00
dependabot[bot]
e9f2e87d35
build(deps): bump github.com/fxamacker/cbor/v2 from 2.8.0 to 2.9.0
Bumps [github.com/fxamacker/cbor/v2](https://github.com/fxamacker/cbor) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/fxamacker/cbor/releases)
- [Commits](https://github.com/fxamacker/cbor/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: github.com/fxamacker/cbor/v2
  dependency-version: 2.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-14 15:46:59 +00:00
Juan Calderon-Perez
c1e9ae3ff9
🐛 bug: Fix static/favicon middlewares file descriptor leaks (#3579) 2025-07-14 15:16:57 +02:00
Kudou Sterain
8f02e0176b
🔥 feat: Add support for Msgpack (#3565) 2025-07-14 14:55:22 +02:00
RW
87370cfee6
Update utils dependency (#3576) 2025-07-14 08:45:19 +02:00
RW
0d03102542
📒 docs: Update utils guide documentation (#3575) 2025-07-13 14:12:15 +02:00
Juan Calderon-Perez
77540e2100
Merge pull request #3574 from gofiber/dependabot/go_modules/github.com/gofiber/schema-1.6.0
build(deps): bump github.com/gofiber/schema from 1.5.0 to 1.6.0
2025-07-13 01:38:10 -04:00
dependabot[bot]
163902979d
build(deps): bump github.com/gofiber/schema from 1.5.0 to 1.6.0
Bumps [github.com/gofiber/schema](https://github.com/gofiber/schema) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/gofiber/schema/releases)
- [Commits](https://github.com/gofiber/schema/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/gofiber/schema
  dependency-version: 1.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-12 17:07:50 +00:00
dependabot[bot]
2d3229aa44
build(deps): bump golang.org/x/net from 0.41.0 to 0.42.0 (#3572)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-11 20:02:16 +02:00
Juan Calderon-Perez
8ef317cbae
🐛 bug: Fix missing Allow header in EnvVar middleware per RFC 9110 (#3570) 2025-07-11 08:42:57 +02:00
Juan Calderon-Perez
c877b9d753
🐛 bug: Fix address parsing for leading/trailing spaces (#3569) 2025-07-10 13:36:33 +02:00
Juan Calderon-Perez
e98e09ed7b
Merge pull request #3568 from gofiber/dependabot/go_modules/github.com/gofiber/utils/v2-2.0.0-beta.10
build(deps): bump github.com/gofiber/utils/v2 from 2.0.0-beta.9 to 2.0.0-beta.10
2025-07-09 09:24:21 -04:00
dependabot[bot]
14b734d7fc
build(deps): bump github.com/gofiber/utils/v2
Bumps [github.com/gofiber/utils/v2](https://github.com/gofiber/utils) from 2.0.0-beta.9 to 2.0.0-beta.10.
- [Release notes](https://github.com/gofiber/utils/releases)
- [Commits](https://github.com/gofiber/utils/compare/v2.0.0-beta.9...v2.0.0-beta.10)

---
updated-dependencies:
- dependency-name: github.com/gofiber/utils/v2
  dependency-version: 2.0.0-beta.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-09 12:59:10 +00:00
Juan Calderon-Perez
10e92eb203
🐛 bug: Fix multipart boundary for Client per RFC 2046 (#3563)
🩹 Fix: remove leading dashes from multipart boundary
2025-07-03 18:30:47 +02:00
Kashiwa
01d8543bed
♻️ Refactor: improve iterator performance. (#3562)
* ♻️ Refactor: improve iterator performance.

```
goos: darwin
goarch: arm64
pkg: github.com/gofiber/fiber/v3/client
cpu: Apple M4
                        │   old.txt    │           new.txt           │
                        │    sec/op    │   sec/op     vs base        │
_Request_Headers-10       140.15n ± 0%   99.39n ± 1%  -29.08% (n=50)
_Request_Params-10        135.70n ± 0%   41.01n ± 0%  -69.78% (n=50)
_Request_AllFormData-10   135.60n ± 0%   94.67n ± 0%  -30.18% (n=50)
_Headers-10                291.3n ± 0%   156.8n ± 1%  -46.17% (n=50)
geomean                    165.6n        88.20n       -46.73%

                        │   old.txt   │              new.txt               │
                        │    B/op     │    B/op     vs base                │
_Request_Headers-10        200.0 ± 0%   184.0 ± 0%   -8.00% (n=50)
_Request_Params-10        232.00 ± 0%   88.00 ± 0%  -62.07% (n=50)
_Request_AllFormData-10    232.0 ± 0%   184.0 ± 0%  -20.69% (n=50)
_Headers-10                296.0 ± 0%   376.0 ± 0%  +27.03% (p=0.000 n=50)
geomean                    237.6        182.9       -23.00%

                        │  old.txt   │          new.txt           │
                        │ allocs/op  │ allocs/op   vs base        │
_Request_Headers-10       7.000 ± 0%   6.000 ± 0%  -14.29% (n=50)
_Request_Params-10        9.000 ± 0%   4.000 ± 0%  -55.56% (n=50)
_Request_AllFormData-10   9.000 ± 0%   6.000 ± 0%  -33.33% (n=50)
_Headers-10               9.000 ± 0%   6.000 ± 0%  -33.33% (n=50)
geomean                   8.452        5.422       -35.85%
```

* 🩹 Fix: fix wrong logic and revert Headers()
2025-07-02 20:35:03 +02:00
RW
e041d63ce9
🧹 chore: Add iterator helpers for client types (#3560)
* feat: add All iterators for client cookie and path params

* Remove deprecated VisitAll helpers
2025-07-02 13:39:25 +02:00
Juan Calderon-Perez
e9e036716a
🧹 chore: Fix compression benchmarks (#3561)
fix benchmark expectations for compression
2025-07-02 07:48:05 +02:00
RW
dd739687d3
Refactor fasthttp iter calls to range loops (#3559)
refactor: replace fastHTTP iter calls with for loops
2025-07-01 14:14:56 +02:00
dependabot[bot]
eddecf22e4
build(deps): bump github.com/valyala/fasthttp from 1.62.0 to 1.63.0 (#3557)
* build(deps): bump github.com/valyala/fasthttp from 1.62.0 to 1.63.0

Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.62.0 to 1.63.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.62.0...v1.63.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-version: 1.63.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/valyala/fasthttp from 1.62.0 to 1.63.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: René <rene@gofiber.io>
2025-07-01 11:06:50 +02:00
Juan Calderon-Perez
4597bc8f81
📒 docs: Add documentation for Stale() (#3555)
* Update docs for Stale()

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-01 09:09:30 +02:00
Juan Calderon-Perez
433d570202
📒 docs: Add net/http compatiblity section (#3556)
* General documentation updates

* Update README.md
2025-07-01 09:08:45 +02:00
Juan Calderon-Perez
fd188301e8
🐛 bug: Fix Body() handling of Content-Encoding per RFC 9110 (#3543)
* Adjust Body() decoding loop

* Handle identity and compress encodings

* Adjust Body status handling

* test: cover multi-encoding decode

* Address review feedback
2025-06-30 09:07:06 +02:00
Juan Calderon-Perez
d79fa01f0f
🐛 bug: Fix Content-Disposition header per RFC 6266 (#3551)
* Use raw UTF-8 filenames in Content-Disposition

* Fix lint issues

* Fix issue with new funct

* Improve and fix quoteRawString

* fix issues

* Fix lint issues

* fix golangci-lint

* Update static_test.go

* Update static_test.go
2025-06-30 09:06:11 +02:00
Laptop
cfa5b3a404
🔥 feat: Add UNIX socket support (#3535)
* set unix socket filemode and remove old unix socket before listening

* add UnixSocketFileMode to docs

* create NetworkUnix constant

* Add testing for listening on Unix network

* fix: always remove temporary directory in test

* try fix test on windows

* align ListenConfig struct

* document unix socket support in whats_new.md

* change default UnixSocketFileMode to 0770

* extend unix socket test

* reword about unix sockets support in whats_new.md

* Update docs/whats_new.md

---------

Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
Co-authored-by: RW <rene@gofiber.io>
2025-06-30 09:04:52 +02:00
Juan Calderon-Perez
bdd9e22bd7
🐛 bug: Fix Cache middleware handling of Age (#3547)
* Revert benchmark loop changes

* test: cover Age header parsing

* generate msgp files

* Update cache.go

* Cast result

* Update cache.go
2025-06-30 09:04:35 +02:00
Juan Calderon-Perez
55e7b1eb9c
🐛 bug: Fix Accept-Language matching per RFC 4647 (#3553)
* test: expand Accept-Language coverage

* Refine Accept-Language matching
2025-06-30 08:58:25 +02:00