Commit Graph

226 Commits (renanbastos93improve-error-handling-csrf-middle)

Author SHA1 Message Date
kiyon ce3d44613c 🔧 fix #556 remove ctx.matched things 2020-07-07 23:25:02 +08:00
Fenny 964f3c59ae 🔨 Make Params available in Route 2020-07-05 11:17:42 +02:00
Fenny 34ac831143 Add json formatting 2020-07-02 20:26:38 +02:00
Fenny 909c683e12 Improve routing calculation 2020-06-30 00:27:28 +02:00
ReneWerner87 d57651835b improve routing performance 2020-06-29 22:51:41 +02:00
Fenny 85d7a6add4 Support Naming Routes 2020-06-25 16:24:21 +02:00
Fenny c0f26798a8 Update router.go 2020-06-21 10:47:11 +02:00
Fenny 3187472744 Update router.go 2020-06-20 17:27:40 +02:00
Fenny 44d739496d Add 405 Method Not Allowed 2020-06-20 17:26:48 +02:00
kiyon 437064e0c6 Abstract Router interface for App and Group. 2020-06-17 15:09:08 +08:00
Fenny abbd18d815 Add CompressedFileSuffix 2020-06-07 20:35:41 +02:00
Fenny 3580b47b6e 🩹 Fix Golint 2020-06-06 07:35:12 +02:00
Fenny ba67287a89 📋 Add route position 2020-06-06 07:31:01 +02:00
wernerr 53d79ca070 fix static routing for index.html 2020-06-03 21:35:49 +02:00
Fenny 64d74e840a Hot fix fasthttp bug 2020-06-03 17:16:10 +02:00
fenny 2f402a5495
Merge pull request #434 from ReneWerner87/master
Fix a problem when matching the static routes
2020-06-02 17:57:05 -04:00
wernerr 5fe772f48a Fix a problem when matching the static routes 2020-06-02 23:25:06 +02:00
Fenny 027823e084 Return 404 if Next does not match 2020-06-01 13:45:04 +02:00
Fenny f9c08818ed Return 404 if Next does not match 2020-06-01 13:36:51 +02:00
Fenny 3f8c6e482a Static Content-Type Fix
Fix #https://github.com/gofiber/fiber/issues/420
2020-06-01 12:54:23 +02:00
Fenny 1827ccce7a Default 404 if Use response is empty 2020-06-01 12:10:30 +02:00
Fenny 5567363941 Replace Sprintf 2020-06-01 12:04:52 +02:00
Fenny 06c119d49a Send 404 Body Response 2020-06-01 11:24:22 +02:00
Fenny ce3d950971 Fix partial wildcard in Static
Co-Authored-By: RW <renewerner87@googlemail.com>
2020-05-27 22:54:09 +02:00
fenny f2c027e715 Small changes (#415)
* Update template examples

* Update fasthttp to v1.13.1

Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>

* Cookie SameSite defaults to Lax

Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
Co-Authored-By: Queru <pascal@queru.net>

* Fix router bug

Co-Authored-By: RW <renewerner87@googlemail.com>

* Remove unused code

Co-Authored-By: RW <renewerner87@googlemail.com>

Co-authored-by: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
Co-authored-by: Queru <pascal@queru.net>
Co-authored-by: RW <renewerner87@googlemail.com>
2020-05-27 10:22:01 +02:00
fenny e8b8fdfb35
Add Handler type (#410)
* Add new supporter
* Add new test condition
* Add Handler Type
2020-05-24 16:02:21 +02:00
wernerr 0ac9b1c635 🐞 Panic on ":param" #405 2020-05-24 14:47:32 +02:00
wernerr 04642a3404 🐞 Panic on ":param" #405 2020-05-24 14:01:52 +02:00
wernerr 3d2d072074 🐞 Panic on ":param" #405 2020-05-24 08:47:47 +02:00
Fenny 8e91e848da Fix case sensitivity params
- Improve performance
- Remove allocations
- Return case sensitive params

Co-Authored-By: RW <renewerner87@googlemail.com>
2020-05-23 09:29:35 +02:00
Fenny 7dae73a40f Refactor internal functions 2020-05-16 05:14:01 +02:00
Fenny b8228e4546 Golint code 2020-05-12 23:24:04 +02:00
Fenny e719fa00bf
Use param support + optimizations (#361)
* Benchmark workflow

* Update router.go

* Clean root

* Add mutex

* Benchmark workflow

* Benchmark workflow
* Add mutex
* Enable benchmark tests
* Enable race testing

Co-Authored-By: ReneWerner87 <renewerner87@users.noreply.github.com>

* Benchmark Workflow

* Benchmark workflow
* Add mutex
* Enable benchmark tests
* Enable race testing

Co-Authored-By: ReneWerner87 <renewerner87@users.noreply.github.com>

* Update security workflow

* Benchmark workflow
* Add mutex
* Enable benchmark tests
* Enable race testing

Co-Authored-By: ReneWerner87 <renewerner87@users.noreply.github.com>

* Make Ctx pool accessible

- Add ctx benchmarks

* v1.9.6

* v1.9.6

Co-Authored-By: ReneWerner87 <renewerner87@googlemail.com>

* Improve context functions

* Add utils benchmarks

* Update benchmarks & tests

* Add utils tests

* New tests

* update test

* Move fastpath tests

* offer negotiation

* Cleanup

* Update Vary

Co-Authored-By: RW <renewerner87@googlemail.com>

* Optimize Append

Co-Authored-By: RW <renewerner87@googlemail.com>

* Optimize more methods

Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: Vic Shóstak <vikkyshostak@gmail.com>

* Add param support to Use

Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: Vic Shóstak <vikkyshostak@gmail.com>

* Add use_params tests

Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: Vic Shóstak <vikkyshostak@gmail.com>

* v1.9.7

Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: Vic Shóstak <vikkyshostak@gmail.com>

* Tests

Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: Vic Shóstak <vikkyshostak@gmail.com>

* v1.9.7

Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: Vic Shóstak <vikkyshostak@gmail.com>
Co-Authored-By: József Sallai <jozsef@sallai.me>
Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>

* Update app_test.go

Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: Vic Shóstak <vikkyshostak@gmail.com>
Co-Authored-By: József Sallai <jozsef@sallai.me>
Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
Co-Authored-By: Nifty255 <nifty255@users.noreply.github.com>

* Rename argument

Co-Authored-By: RW <renewerner87@googlemail.com>

* Add nosec for WriteByte

Co-Authored-By: RW <renewerner87@googlemail.com>

* Add media article

* Update media articles

* Fix typo

Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>

* Fix typo

Co-authored-by: ReneWerner87 <renewerner87@users.noreply.github.com>
Co-authored-by: ReneWerner87 <renewerner87@googlemail.com>
Co-authored-by: Vic Shóstak <vikkyshostak@gmail.com>
Co-authored-by: József Sallai <jozsef@sallai.me>
Co-authored-by: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
Co-authored-by: Nifty255 <nifty255@users.noreply.github.com>
2020-05-12 19:24:04 +02:00
Fenny 99f95b2561
v1.9.6 (#360)
**🚀 Fiber `v1.9.6`**

Special thanks to @renanbastos93 & @renewerner87 for optimizing the current router.
Help use translate our API documentation by [clicking here](https://crowdin.com/project/gofiber)

🔥 New
- `AcquireCtx` / `ReleaseCtx`
The Ctx pool is now accessible for third-party packages
- Fiber docs merged [Russian](https://docs.gofiber.io/v/ru/) translations **84%**
- Fiber docs merged [Spanish](https://docs.gofiber.io/v/es/) translations  **65%**
- Fiber docs merged [French](https://docs.gofiber.io/v/fr/) translations  **40%**
- Fiber docs merged [German](https://docs.gofiber.io/v/de/) translations  **32%**
- Fiber docs merged [Portuguese](https://docs.gofiber.io/v/pt/) translations  **24%**

🩹 Fixes
- Hotfix for interpolated params in nested routes https://github.com/gofiber/fiber/issues/354
- Some `Ctx` methods didn't work correctly when called without an `*App` pointer.
- `ctx.Vary` sometimes added duplicates to the response header
- Improved router by ditching regexp and increased performance by **817%** without allocations.
```go
// Tested with 350 github API routes
Benchmark_Router_OLD-4      614   2467460 ns/op   68902 B/op   600 allocs/op
Benchmark_Router_NEW-4     3429    302033 ns/op       0 B/op     0 allocs/op
```

🧹 Updates
- Add context benchmarks
- Remove some unnecessary functions from `utils`
- Add router & param test cases
- Add new coffee supporters to readme
- Add third party middlewares to readme
- Add more comments to source code
- Cleanup some old helper functions

🧬 Middleware
- [gofiber/adaptor](https://github.com/gofiber/adaptor) `v0.0.1` Converter for net/http handlers to/from Fiber handlers
- [gofiber/session](https://github.com/gofiber/session) `v1.0.0` big improvements and support for storage providers
- [gofiber/logger](https://github.com/gofiber/logger) `v0.0.6` supports `${error}` param
- [gofiber/embed](https://github.com/gofiber/embed) `v0.0.9` minor improvements and support for directory browsing 

Co-authored-by: ReneWerner87 <renewerner87@googlemail.com>
2020-05-11 13:42:42 +02:00
Fenny 6e58bfcde3
Make ctx pool accessible + ctx benchmarks (#355)
**🚀 Fiber `v1.9.6`**

The Ctx pool is now accessible for third-party packages

🔥 New
- `func AcquireCtx(fctx *fasthttp.RequestCtx) *Ctx`
- `func ReleaseCtx(ctx *Ctx)`

🩹 Fixes
- Some `Ctx` methods didn't work correctly when called without an `*App` pointer.
- `ctx.Vary` sometimes added duplicates to the response header

🧹 Updates
- Add context benchmarks
- Remove some unnecessary functions from `utils`

🧬 Middleware
- [gofiber/adaptor](https://github.com/gofiber/adaptor) `v0.0.1` Converter for net/http handlers to/from Fiber handlers
2020-05-11 04:30:31 +02:00
Fenny 72a5fb8ffa
Skip passing * value for root paths (#347)
* Skip passing * value for root paths

* Remove t.Log from test

Co-authored-by: Fenny <fenny@protonmail.com>
2020-05-07 21:02:24 +02:00
Fenny e3b777bacf
🤖 v1.9.5 (#344)
* 🤖 v1.9.5

Co-authored-by: Fenny <fenny@protonmail.com>
2020-05-07 20:22:26 +02:00
Fenny ae7d2bd754
Hotfix wildcard (#342)
* Hotfix wildcard
2020-05-07 19:43:25 +02:00
Fenny 8ea25a79b9
💥 v1.9.4 (#341)
* Update router.go

Co-authored-by: Fenny <fenny@protonmail.com>
2020-05-07 19:28:21 +02:00
Fenny 75604b0254
🩹 Fix 403 Directory Index is Forbidden (#329)
* Fix Directory Index is Forbidden
2020-04-30 14:21:33 +02:00
Fenny 0419d089e9
🧹 PR for 1.9.3 (#321)
* Add crowdin

* Update media links

* Update README_de.md

* Update README_de.md

* Update README_de.md

* Add crowdin link

* Print addr when listening

* Print addr on listening

* Add DisableStartupMessage

* Fix typo

* Update Test_BodyParser

* Support ETags

* v1.9.3
2020-04-28 21:34:34 +02:00
Fenny 885c11c619 Fix typo 2020-04-24 22:21:41 +02:00
Fenny 4242901c92 v1.9.2 2020-04-23 00:33:36 +02:00
Fenny 79c378c384 v1.8.431 2020-03-31 10:03:39 +02:00
Fenny 48dd9846c6 Issue #250
Disable common errors
Fix issue #250
2020-03-29 14:13:02 +02:00
Fenny 7c629dec26
Update router.go 2020-03-24 12:21:55 +01:00
Fenny 5d7b03fd37
Update router.go 2020-03-24 12:21:25 +01:00
Fenny a4c0aa11d7
Update router.go 2020-03-24 12:20:07 +01:00
Fenny d620a97b34
Update router.go 2020-03-24 12:19:22 +01:00
Fenny 3c333c2a51
Update router.go 2020-03-24 12:12:22 +01:00
Fenny d5a7110585
Update router.go 2020-03-24 11:11:52 +01:00
Fenny 3c8f582cad More cleaning 2020-03-24 05:31:51 +01:00
Fenny f40d786caa v1.8.4
- Remove middleware folder
- Extend travis testing
2020-03-22 01:51:53 +01:00
Fenny b425a5b4bf v1.8.34 2020-03-20 16:43:28 +01:00
Fenny 5c619e872c Stale isEqual for now 2020-03-17 13:24:08 +01:00
Fenny 3cea91e3da Apply strict / case options to override 2020-03-16 22:30:00 +01:00
Fenny c7baaf6243 v1.8.33 2020-03-16 15:00:58 +01:00
Fenny bec9eecb29 v1.8.32 2020-03-15 14:45:57 +01:00
Fenny 0133d9c331 Add StaticConfig 2020-03-15 14:00:03 +01:00
Fenny 20de89cab3 v1.8.32 2020-03-15 13:48:54 +01:00
Fenny 8f69de45ab Fix root index.html 2020-03-14 14:10:49 +01:00
Fenny 558fcd2f30 v1.8.3 2020-03-14 12:30:21 +01:00
Fenny 1f944d2a41 Remove comments 2020-03-04 12:43:59 +01:00
Fenny 21590dffe9 v1.8.2 2020-03-04 12:30:29 +01:00
Fenny d547d441a3 New internal router alpha 2020-03-03 12:21:34 -05:00
Fenny ca6aa02e7f More middlewares 2020-03-01 06:56:41 +01:00
Fenny 88ffd8fb13 Remove compressionlevel 2020-02-29 22:11:25 -05:00
Fenny 135c0ba12b Compression update 2020-02-28 20:19:31 -05:00
Fenny 8061bb007d v1.8.1 - Middleware + Compression 2020-02-28 06:41:48 +01:00
Fenny df65a5785b Rename View -> Template settings 2020-02-27 05:12:41 -05:00
Fenny b872361da9 Strong type app.METHODS 2020-02-27 04:10:26 -05:00
Fenny 2eeb40273c v1.8.0 2020-02-26 19:31:43 -05:00
Fenny bf66978a7f Fix comments 2020-02-22 17:03:30 -05:00
Fenny 1991d8db32 🎉 Official v1 Release 2020-02-21 18:07:43 +01:00
Fenny b01e74187c v0.7.0 2020-02-21 18:06:08 +01:00
Fenny 813850c83c v2.0.0 2020-02-21 16:56:32 +01:00
Fenny bdaac2d116 v1.7.0 2020-02-21 16:54:14 +01:00
Fenny 4757c0ea3e fix static 2020-02-21 04:16:07 +01:00
Fenny 1f7d70e5e8 Fix render 2020-02-21 04:11:51 +01:00
Fenny 26ea13cac0 fix static 2020-02-21 03:54:36 +01:00
Fenny 21b77bf03e 😲 2020-02-21 01:54:50 +01:00
Fenny 659e1a1ab6 Deprecate old functions 2020-02-16 18:00:14 +01:00
Fenny 7f3320c415 Add Recover 2020-02-12 13:23:47 -05:00
Fenny e584d27121 Travis, leave me alone! 2020-02-12 02:01:14 +01:00
Fenny a0f00dbb6b Fix test 2020-02-12 01:56:11 +01:00
Fenny 5a4792b7d4 Fix tests 2020-02-11 06:29:09 +01:00
Fenny 0ed4b20cfa Rename structs 2020-02-11 01:26:09 +01:00
Fenny 725d875ca5 Add Grouping (Beta) 2020-02-10 05:48:52 +01:00
Fenny 1e7df547ba Clean up repository 2020-02-10 01:24:59 +01:00
Fenny c68e58a381 Cleanup project directory 2020-02-08 01:05:13 +01:00
Fenny 5283fb8f37 Rename / Add middleware 2020-02-05 11:54:10 +01:00
Fenny bd2e034c49 Minor optimizations 2020-02-05 02:53:07 +01:00
Fenny afeaecd044 Update fasthttp v1.9.0 2020-02-04 13:53:46 +01:00
Vic Shóstak 18e7fcfc35 Huge refactoring, Add dummy CORS middleware 2020-02-01 19:42:40 +03:00
Fenny 3237404584 v1.2.1 🎉 107 Stars 🌟 2020-01-30 23:17:25 -05:00
Fenny 9ff149324e v1.1.0 🎉 100 Stars 🌟 2020-01-28 14:28:09 -05:00
Fenny 31876e3109 v1.0.2 2020-01-22 05:42:37 +01:00
Fenny 7041f051e1 Update typos 2020-01-21 00:57:10 +01:00
Fenny 2730e0c2ff v1.0.0-pre-release 2020-01-20 04:33:55 +01:00
Fenny 44661d9270 v0.9.3 2020-01-18 17:15:49 +01:00
Fenny 93e5e0e891 v0.9.0 - Prefork (SO_REUSEPORT) 2020-01-17 21:25:11 +01:00
Fenny 359e86f55b v0.8.1 2020-01-16 06:04:28 +01:00
Fenny e6d60ebaaf Update to gofiber 2020-01-16 05:58:23 +01:00
Fenny 286978a4b1 v0.8.0-pre-release 2020-01-16 04:54:00 +01:00
Fenny 453cd6fbb5 v0.7.0 2020-01-16 03:17:49 +01:00
Fenny d0d200e956 v0.7.0 2020-01-16 03:17:23 +01:00
Fenny 43c5a56cf7 - 2020-01-16 02:31:44 +01:00
Fenny 9b6630cc9e v0.6.9 2020-01-16 00:24:58 +01:00
Fenny 8d790b5cf0 v0.6.2 2020-01-15 03:07:49 +01:00
Fenny 2184b7c9b5 Add benchmarks 2020-01-14 05:44:59 +01:00
Fenny 3572e48e58 v0.6.0 2020-01-13 06:20:53 +01:00
Fenny e65d0999a0 0.5.5: SendStatus, SendString, SendBytes, update doc 2020-01-12 21:26:44 +01:00
Fenny e9a4f6e360 v0.5.0 2020-01-11 04:59:51 +01:00
Fenny a4f86dbd1e Added 7 new functions, see doc 2020-01-10 03:09:43 +01:00
Fenny 46a8ffb236 Update to v0.4.0 2020-01-09 05:28:45 +01:00
Fenny 39f08beb80 Faster JSON serializing 2020-01-09 03:33:09 +01:00
Fenny 435d4b78ef Add ReadTimeout to Settings 2020-01-08 23:41:41 +01:00
Fenny 6f16bc0e11 . 2020-01-08 03:24:53 -05:00
Fenny fb3ce3dd07 . 2020-01-08 03:12:05 -05:00
Fenny 457fabd625
Add files via upload 2020-01-07 11:28:06 -05:00
Fenny 39d941965f
Add files via upload 2020-01-06 18:38:39 -05:00
Fenny d6dacf6fea
Add files via upload 2020-01-03 05:57:41 -05:00
Fenny 30e74c7043
Add files via upload 2020-01-02 09:00:26 -05:00
Fenny 7b9191ded9
Add files via upload 2019-12-30 07:40:59 -05:00
Fenny 8899857793
Update router.go 2019-12-30 13:33:50 +01:00
Fenny 615806664c
Add files via upload 2019-12-30 07:29:42 -05:00