3375 Commits

Author SHA1 Message Date
Muhammed Efe Çetin
9428befb9c
Merge remote-tracking branch 'origin/master' into v3-beta 2022-10-28 17:26:17 +03:00
pj
ff4602980a
- update Locals function to accept interface{} key (#2144)
- update Locals function to accept interface{} key (Requires new version of fasthttp)

Co-authored-by: rocketlaunchr-cto <rocketlaunchr.cloud@gmail.com>
2022-10-27 07:51:08 +02:00
dependabot[bot]
fd5045edf9
Bump github.com/valyala/fasthttp from 1.40.0 to 1.41.0 (#2171)
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.40.0...v1.41.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-26 12:16:49 +02:00
M. Efe Çetin
691d2e6ad5
🗑️ deprecate: go 1.14 & go 1.15 support deprecation (#2172)
* 🗑️ deprecate: go 1.14 & go 1.15 support deprecation
https://github.com/valyala/fasthttp/pull/1379

* fix tests
2022-10-26 11:51:50 +02:00
Diego Parisi
eb692727c5
✏️ Fix: comment typo (#2173)
Just a typo

I think there's a typo "unmashal" for "unmarshal"
2022-10-25 19:05:57 +03:00
marcmartin13
4d584c9c9b
📝 Cache readme and docs update (#2169)
* Update README.md

* update no-store request directive

added cache status unreachable

* Update cache.go
2022-10-25 07:52:28 +02:00
M. Efe Çetin
156b81c768
🐛 bug: improve mounting behavior (#2120)
* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* 🐛 bug: fix mounting doesn't work if when to declare it before routes

* add onMount hooks, mountPath like express.js, better behavior for onName, onRoute, onGroup, onGroupName hooks on mounted apps

* add comment

* use once

* fix views when both app and sub-app have view engine, better behavior for mount path

* fix tests

* fix tests

* make some tasks

* make some tasks
2022-10-25 07:51:44 +02:00
RW
5b1885a44c
prepare release 2.39.0 v2.39.0 2022-10-23 10:01:35 +02:00
marcmartin13
c187c6a2f5
🚀 [Feature]: Cache-Control: no-cache (#2159)
* Added noCache field

Check if the request header Cache-Control contains no-cache

* Update cache.go

* Update config.go

* Update cache.go

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1

* patch-1
2022-10-21 10:28:31 +02:00
kinggo
5fb93fdff6
🐛 fix: multi-byte AppName displays confusion (#2148)
fix: solve wrong print width
2022-10-21 08:30:56 +02:00
José Roberto Vasconcelos
917c937c76
[Bug] Fix query string parameter pass to fiber context (#2164)
* Remove dump to keep querystring param when test

* Remove unused import
2022-10-20 20:42:06 +02:00
RW
ce2d087394
Improve memory storage (#2162)
* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance
2022-10-19 16:22:42 +02:00
sadfun
5316f0823d
🚀 Make IP validation 2x faster (#2158)
* 🚀 Make IP vallidation 2x faster

* Add tests for IP validation

* phrasing & linter fix

* change test assert function

That was a surprise that testing style in gofiber/utils and in gofiber/fiber/utils are different 😳
2022-10-18 11:59:23 +02:00
Supakorn Wongsawang
709b132dca
🩹 Fix: handle multiple X-Forwarded header (#2154)
* fix: handle multiple XForwarded

* fix: use strings.Index instead of strings.Split

Co-authored-by: Supakorn Wongsawang <supakorn.wongsawang@agoda.com>
2022-10-18 11:23:35 +02:00
kinggo
2b7a632a19
style: update logger's comment (#2157) 2022-10-17 18:42:05 +03:00
kinggo
d275091a2f
🐛 fix: solve data race in middleware/proxy's test (#2153)
fix: solve data race in middleware/proxy's test
2022-10-17 17:20:41 +02:00
xbt573
a023fc2947
🐛 Fix: Reset d.Data instead of deleting keys in it (#2156)
🐛 Reset d.Data instead of deleting keys in it
2022-10-17 16:30:34 +02:00
Dio Rovelino
f3c7c424b7
Update ReadmeID (#2150) 2022-10-11 09:52:00 +03:00
Soham Sen
9a6002056c
Switch to text/javascript as per RFC9239 (#2146)
* Switch to text/javascript as per RFC9239

* Add deprecated flag to application/javascript
2022-10-10 14:29:51 +02:00
M. Efe Çetin
23b817083b
v3: fix benchmark results related to handler, next (#2130) 2022-10-10 12:59:19 +02:00
M. Efe Çetin
925d5d03dc
📝 docs: add doc about usage of CSRF and EncryptCookie middlewares. (#2141) 2022-10-06 07:54:29 +02:00
Nathan Faucett
6a5fc64edd
add CacheControl to Static config (#2140)
* add CacheControl to Static config

* change config name to ModifyResponse

Co-authored-by: Nathan Faucett <nfaucett@utility.com>
2022-10-05 18:14:37 +02:00
kinggo
00ebb216d4
test: add nil jsonDecoder test case (#2139)
test: add nil jsonDecoder test case
2022-10-05 15:46:14 +02:00
leonklingele
902e30efb6
utils: update mime extensions (#2133) 2022-10-05 09:10:20 +02:00
RW
2a3ee9ca41
fix - agent.Struct fails to unmarshal response since 2.33.0 #2134 (#2137) 2022-10-05 09:04:29 +02:00
Ilhan
e85a29abf3
📝 docs: Update language count (#2131) 2022-10-01 10:23:47 +03:00
Muhammed Efe Çetin
7fb50f11f6
✏️ v3 : replace utils.AssertEqual with require in filesystem mw tests 2022-09-30 18:34:38 +03:00
M. Efe Çetin
668b0c85f8
v3 (enhancement): refactor filesystem middleware with io/fs (#2027)
*  v3 (feature): refactor filesystem middleware with `io/fs`

* update docs

* attachment support.

* fix
2022-09-29 08:28:52 +02:00
kinggo
8e8ad95079
feat: support to set client in proxy mw (#2117)
optimize: add WithClient
2022-09-28 14:27:58 +02:00
Amir Hossein
66d5b195c5
fix unhandled errors and update code comments to help the IDEs (#2128)
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name

* handle file error on closing

* fix unhandled in common_linux.go

* fix unhandled errors in helpers_test.go

* fix unhandled errors in listen_test.go

* remove unused parameter in emptyHandler method

* refactor path.go

* unhandled error in hooks test

* fix unhandled errors in app_test.go

* fix unhandled errors in ctx_test.go

*  fix unhandled errors in helpers_test.go

* revert app_test.go

* remove redundant parentheses and update comments

* update code comment for helping ide

* update code comment for helping ide

* fix unhandled error in app_test.go

* update code comments for helping IDEs

* fix unhandled errors in app_test.go

* update code comment for helping the IDEs
2022-09-28 14:26:20 +02:00
Fufu
4108d73fe0
✏️ Fix: typos (#2127)
Fix: typos
2022-09-28 08:55:28 +03:00
kinggo
ff348b5e92
feat: Add GetRoutes (#2112)
feat: Add GetRoutes
2022-09-27 09:02:38 +02:00
RW
cc1e9bf115
prepare release v2.38.1 v2.38.1 2022-09-26 13:21:16 +02:00
RW
d1778f381a
prepare release v2.38.0 2022-09-26 13:20:25 +02:00
René Werner
01cfc64f1c prevent v3 from affecting v2 benchmarks 2022-09-26 13:14:53 +02:00
kinggo
14a5f61c2c
test: fix Test_Ctx_ParamParser route param (#2119)
test: fix Test_Ctx_ParamParser route param
v2.38.0
2022-09-25 09:32:03 +03:00
Muhammed Efe Çetin
ca6f25a890
v3 (deps): move utils to https://github.com/gofiber/utils 2022-09-23 21:19:44 +03:00
M. Efe Çetin
10d6f69a89
v3 (feature): new redirection methods (#2014)
*  v3 (feature): new redirection methods

* add flash messages

* withinput, parsing flash message

* add tests

* add benchmarks

* gosec issues

* fix tests

* fix tests

* fix performance issues

* fix performance issues

* optimization.

* better names

* fix tests

* Update router.go

* fix

* fix old messaages with flash messages behavior, add new test case with req

* complete some reviews

* add pool for redirection.

* use constant

* update

*  v3 (feature): new redirection methods

* fix tests, optimize cookie parsing (9 allocs -> 1 alloc)

* test case for message includes comma

* cleanup

* optimization.

* some improvements for the redirect feature

* fix Benchmark_Redirect_Route_WithFlashMessages

* some improvements for the redirect feature

* Update redirect.go

* improve message parsing & test case

Co-authored-by: René Werner <rene@gofiber.io>
2022-09-23 08:17:34 +02:00
dayu
d461bf231e
Update README.md (#2114)
some demo codes missing parenthesis, i added them to make that codes could be copied and run
2022-09-22 12:30:19 +03:00
naoki kuroda
72397a7c5b
✏️ fix typo (#2110)
✏️ fix typo
2022-09-21 16:41:17 +02:00
naoki kuroda
b319e8d00c
✍ Correct README_ja (#2108)
✍ correct reademe_ja
2022-09-21 14:50:16 +02:00
kinggo
896b37183f
🐛 fix: same struct parse param failed (#2101)
fix: same struct parse param failed
2022-09-19 10:58:04 +02:00
M. Efe Çetin
305bb072be
🧹 tidy up: fix linter errors for tests (#2102) 2022-09-19 08:33:58 +02:00
naoki kuroda
45229ed935
Upgrade go version to 1.19 in go.mod (#2103)
upgrade go version to 1.19 in go.mod
2022-09-19 08:09:51 +02:00
Amir Hossein
1d773c7f3c
update code comments for helping IDEs and fix unhandled error in test (#2099)
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name

* handle file error on closing

* fix unhandled in common_linux.go

* fix unhandled errors in helpers_test.go

* fix unhandled errors in listen_test.go

* remove unused parameter in emptyHandler method

* refactor path.go

* unhandled error in hooks test

* fix unhandled errors in app_test.go

* fix unhandled errors in ctx_test.go

*  fix unhandled errors in helpers_test.go

* revert app_test.go

* remove redundant parentheses and update comments

* update code comment for helping ide

* update code comment for helping ide

* fix unhandled error in app_test.go

* update code comments for helping IDEs
2022-09-18 15:32:54 +02:00
Jinquan Wang
093882cfdf
v3 (feature): new Route method (#2065)
* 🎨 perf: change name to add new feature

*  feat add route

* 🎨 perf: rollback name

* 🎨 perf: change file name

* fix: fix errors caused by register

* 🎨 perf: change filed to private and change comment

* feat: interface is better

* 🎨 perf: change type name

* deeper tests

Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-09-18 11:35:57 +02:00
Hakan Kutluay
7c83e38757
🔥 Update: add timeout context middleware (#2090)
* 🔥 Feature: add timeoutcontext middleware

* move timeoutconext to timeout package

* remove timeoutcontext readme.md

* replace timeout mware with timeout context mware

* Update README.md

* Update README.md

* update timeout middleware readme

* test curl commands fixed

* rename sample code title on timeout middleware

Co-authored-by: RW <rene@gofiber.io>
2022-09-16 16:03:02 +02:00
René Werner
e829caf808 correct ctx release for viewBindMap 2022-09-16 15:22:55 +02:00
Amir Hossein
6e51f801fb
update code comment for helping IDEs (#2095)
* fix unhandled errors

* fix unhandled error in cache package test

* omit variable type

* omit variable type

* rename variable because collide with the imported package name

* handle file error on closing

* fix unhandled in common_linux.go

* fix unhandled errors in helpers_test.go

* fix unhandled errors in listen_test.go

* remove unused parameter in emptyHandler method

* refactor path.go

* unhandled error in hooks test

* fix unhandled errors in app_test.go

* fix unhandled errors in ctx_test.go

*  fix unhandled errors in helpers_test.go

* revert app_test.go

* remove redundant parentheses and update comments

* update code comment for helping ide

* update code comment for helping ide
2022-09-16 11:51:40 +02:00
Gökhan Özeloğlu
1a7f7ed8a9
v3: Change startup message (#2041)
* Add figlet text for Fiber startup message

* Fiber figlet text is added to beginning of the startup message.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>

* Refactor startup message

* Table is removed. Logs are added.

* Test cases refactored.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>

* Add colorful log messages

* Used custom color codes to make logs colorful.

* Added a new test case.

* Fixed broken test case after changes.

* Added some color codes as a variable.

* Handled Windows case with init() function. Color codes are set empty string.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>

* Change color text logic

* Color codes are taken from config.

* Version is added to figlet text.

* Reordered "server started on" message.

* Test cases are refactored.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>

* Add if condition for Windows

* OS checked in tests for Windows machines.

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>

* some improvements

* Fix startup message tests

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>

* colorize PIDs

Signed-off-by: Gökhan Özeloğlu <gokhan.ozeloglu@deliveryhero.com>
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-09-15 09:53:07 +02:00