Commit Graph

85 Commits (main)

Author SHA1 Message Date
Muhammed Efe Çetin 4105b008c2
Merge remote-tracking branch 'origin/master' into v3-beta 2022-08-19 14:33:31 +03:00
Muhammed Efe Çetin cadd6014bb
v3: cleanup & update deps 2022-08-17 23:01:59 +03:00
M. Efe Çetin 2517944c80
feature: route constraints (#1998)
* Segment parameters constraints and determining it's type

* add parsing for constraints.

* fix tests

* add tests, benchs & some fixes.

* fix regex & datetime tests.

* clean up constraint parser, multiple constraint support.

* update

* regex customization.

* constants, remove variadic methods.

* add some benchs, refactor constraint check funtion.

* more readable conditions

* fix tests

* precompile regex

* precompile regex when parsing the route

* update comments
Co-authored-by: wernerr <rene@gofiber.io>

Co-authored-by: Mohab Abd El-Dayem <mohab.m.mohamed@gmail.com>
Co-authored-by: RW <rene@gofiber.io>
2022-08-16 08:05:50 +02:00
M. Efe Çetin 41159296f3
v3: revert " v3 (feature): use any as default Message type of Error struct (#1925)" (#2000)
Revert " v3 (feature): use any as default Message type of Error struct (#1925)"
2022-08-08 08:21:00 +02:00
M. Efe Çetin adcb1f2bf1
v3: fix benchmark results (#1982)
* v3: fix benchmark results

* v3: fix benchmark results

* Fix Benchmark_Router_Github_API

* reduce duplicated tests run actions

* reduce duplicated tests run actions

* fix some benchmarks

Co-authored-by: wernerr <rene@gofiber.io>
2022-08-07 14:53:01 +03:00
M. Efe Çetin a458bd344c
v3 (feature): convert fiber.Ctx type to interface (#1928)
*  v3: convert fiber.Ctx type to interface

* update ctx methods

* add new methods to customize ctx, fix some problems

* update comments.

* fix something
2022-07-13 07:48:29 +02:00
M. Efe Çetin e35a594cf1
v3 (feature): use any as default Message type of Error struct (#1925)
*  v3: use any as default Message type of Error struct.

*  v3: use any as default Message type of Error struct.

*  v3: use any as default Message type of Error struct.

*  v3: use any as default Message type of Error struct.
2022-06-12 18:37:23 +02:00
Muhammed Efe Çetin 8a15f77fc4
v3: move most deps to go.mod 2022-06-02 17:37:53 +03:00
Muhammed Efe Çetin edd89de2d6
v3: remove deprecations 2022-05-31 17:50:31 +03:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
RW 1bbcb4b8f3
Fix for "Why net.Addr is fiber.testAddr, not *net.TCPAddr?🤗 #1574" (#1784) 2022-02-19 02:08:06 +01:00
M. Efe Çetin 68d3b773bc
Add route naming feature. (#1650)
* Add route naming feature.

* Update basicauth_test.go

* Fix gosec issues.

* Change RoutaName -> Name

* Fix race conditions.

* Update READMEs.
2021-12-28 14:04:04 +01:00
Gusted 7b7dcf29f7
♻️ Tidy up the codebase (#1613)
* run gofmt

* add t.Helper()

* Simplify assigns

* Simplify make operation

* Remove unused field in struct

* Fix typo

* Run gofumpt ./

* Consistent spacing

* len(...) can never be negative

* Use ReplaceAll

* Simplify operation

* Remove deadcode

* Fix typo

* Tidy up `} else { if ...`

* Fix AssertEqual

* Remove t.Helper() to fix go1.14.15
2021-11-05 08:00:03 +01:00
wernerr 07485247a5 🐛 Fix - Gosec issue
[/github/workspace/helpers.go:91-93] - G307 (CWE-703): Deferring unsafe method "Close" on type "*os.File" (Confidence: HIGH, Severity: MEDIUM)
2021-10-18 09:06:00 +02:00
wernerr 9b47b767b7 🐛 Fix - Gosec issue
[/github/workspace/helpers.go:91-93] - G307 (CWE-703): Deferring unsafe method "Close" on type "*os.File" (Confidence: HIGH, Severity: MEDIUM)
2021-10-18 08:46:02 +02:00
wja513 dd45be693a
cookie: add possibility to disable same site attribute (#1428)
* fix some old browsers cann't set the cookie if it contains SameSite property.

* add "SameSite" attribute constants and test case.

Co-authored-by: wangjiangao <wangjiangao@360.cn>
2021-07-16 20:08:17 +02:00
Andreas 2703e92c5d
Added decompression cases for Body function (#1402)
* Added decompression cases for Body function

* Fixed signature of Body() function

* Removed regex, added Header.Peek

* Added test case with compression

* Added Benchmark, moved compression names to helpers and made them constants

* Added long brotli as a constant

* Update ctx.go

improve Body function

* Update ctx.go

improve performance

* Fixed formatting

* Update helpers.go

Co-authored-by: RW <rene@gofiber.io>
2021-06-24 07:47:21 +02:00
Wei Lun 41b642fbd3
deprecate feature-policy (#1392) 2021-06-21 08:49:49 +02:00
Diego Sandrim 0dc67e80d2 Moves .getBytes and .getString from package variable to App instance variable, avoiding data race when creating a new App. 2021-05-05 17:24:26 -03:00
Kiyon b46185e1b0 👷 Fix hardcode tls to startupMessage in app.Listener 2021-02-23 16:40:17 +08:00
Kiyon 00dbdd5fb3 👷 Add network type constant 2021-02-08 11:35:17 +08:00
Kiyon 0ec0f50cfd 🔥 Add network option 2021-02-07 13:55:13 +08:00
ReneWerner87 b51def0bb8 🐛 UnescapePath not working #1102
Co-authored-by: Fenny <fenny@gofiber.io>
2021-01-06 13:21:54 +01:00
Sujit 71e4485c22 update code to return prefix on empty path 2020-12-28 10:26:56 +05:45
Sujit 0fed63deb3 Check if path is empty or not 2020-12-28 10:20:49 +05:45
Kiyon bdfad180f7 👷 Auto add '/' prefix for Group 2020-12-24 14:14:49 +08:00
Fenny 1468a049c4 ✏ removeNewLines is present in fh 1.18
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
Co-Authored-By: kiyon <kiyon@gofiber.io>
2020-12-11 00:49:57 +01:00
Kiyon d6d831e2b1 👷 fix lint 2020-11-30 13:49:13 +08:00
David Mazary 71d3e16be4 🚨 Remove unused isIPv6 func 2020-10-03 13:31:33 -04:00
Fenny d6f717148a 🛠 correct convert naming 2020-09-27 12:22:17 +02:00
Fenny 2768ea2a77 🙌 make utils public
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-14 12:12:29 +02:00
Fenny 77843393c4 🏃‍♀️ move utils to internal
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-14 09:27:25 +02:00
Fenny e9a4f6e360 v0.5.0 2020-01-11 04:59:51 +01:00
Fenny 39d941965f
Add files via upload 2020-01-06 18:38:39 -05:00
Fenny 615806664c
Add files via upload 2019-12-30 07:29:42 -05:00