Commit Graph

142 Commits (2c6d7e00c49d33d017f9f85ea909191f2197b237)

Author SHA1 Message Date
ReneWerner87 2c6d7e00c4 🌵hybrid routing with tree and fast router 2020-08-10 10:54:41 +02:00
ReneWerner87 df3c48a734 🌵hybrid routing with tree and fast router 2020-08-10 10:51:38 +02:00
ReneWerner87 945b61d1c3 🌵hybrid routing with tree and fast router 2020-08-09 21:53:15 +02:00
kiyon cf22aa2ae5 🩹 handle invalid http method 2020-07-24 22:55:57 +08:00
Fenny 396b6ddebc 🗑️ Remove pos from Route
Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: kiyon <kiyonlin@users.noreply.github.com>
2020-07-22 02:07:57 +02:00
ReneWerner87 b34a77bc96 💉 Sync route method metadata
Co-authored-by: Fenny <fenny@gofiber.io>
2020-07-21 23:30:52 +02:00
Fenny f681e2676f 🗑️ Deprecate app.Routes, introduce app.Stack
Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: kiyon <kiyonlin@users.noreply.github.com>
2020-07-21 22:50:46 +02:00
wernerr b9bdc0d4a8 🚀 compress same route's handler 2020-07-20 19:29:54 +02:00
kiyon 174eb0e33d 🚀 compress same route's handler and sort routes when registering 2020-07-20 21:43:01 +08:00
Fenny f9e6ea8103 🖇 Cleanup router chaining 2020-07-19 13:36:26 +02:00
ReneWerner87 1b2d3d92c4 🔗Allow route method chaining
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-serve-static-core/index.d.ts#L119-L126
2020-07-19 10:04:21 +02:00
Fenny da85c85c14 🧪 Increase test coverage: 96% 2020-07-15 17:43:30 +02:00
renanbastos93 e070968d2d 🚀 refactor: change status code number to constant 2020-07-14 00:55:41 -03:00
kiyon 2cfc1b1546 👷 Extract "USE" to a global const variable 2020-07-12 23:54:22 +08:00
kiyon 9b14fc78d1 💡 add ctx.matched to determine if request matched a non USE route. 2020-07-08 22:40:44 +08:00
ReneWerner87 d2e85a1eea 🚀 Better performance for MethodNotAllowed process 2020-07-08 13:42:10 +02:00
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