Commit Graph

341 Commits (dependabot/github_actions/golangci/golangci-lint-action-7)

Author SHA1 Message Date
Amir Hossein f482b303b5
remove redundant parentheses and update comments (#2082)
* 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
2022-09-11 13:09:39 +02:00
Muhammed Efe Çetin e3282f6408
♻️ v3 (enhancement): replace `c.Hostname()` -> `c.Host()` & add `c.Hostname()` that returns host without port 2022-09-06 18:43:06 +03:00
Muhammed Efe Çetin 319b8ea3a8
Merge remote-tracking branch 'origin/master' into v3-beta 2022-09-03 23:56:45 +03:00
M. Efe Çetin 4d28b1e200
🐛 bug: make tlsHandler public to use it with Listener (#2034)
* 🐛 bug: ClientHelloInfo support for app.Listener

* 🐛 bug: ClientHelloInfo support for app.Listener

* fix

* make tlshandler public

* update

* 🐛 bug: make tlsHandler public to use it with Listener #2034

Co-authored-by: wernerr <rene@gofiber.io>
2022-08-24 09:47:37 +02:00
Jinquan Wang 9c98a1fb37
🐛 bug: Case sensitivity for parameters in GetRouteURL (#2010)
* 🐛 bug: Case sensitivity for parameters in GetRouteURL

* ✏️ perf: error spell
2022-08-24 09:16:19 +02:00
George Bolo 8540d0afdc
fixes #2016 - make IP() and IPs() more reliable (#2020)
* fixes #2016 - make IP() and IPs() more reliable

* improve the performance of IP validation functionality

* refactor IP validation and make it a configuration option
2022-08-23 08:32:21 +02:00
Trim21 b161f805c2
v3(enhancement): remove `utils.Trim*` (#2030)
stdlib functions have same performance in go1.19
2022-08-20 13:52:09 +08:00
Muhammed Efe Çetin 4105b008c2
Merge remote-tracking branch 'origin/master' into v3-beta 2022-08-19 14:33:31 +03:00
Thomas 2edcf95f57
update: tls.ClientHelloInfo in Ctx (#2011)
* Update go.mod

* wip

* wip

* wip

* wip

* wip

* Move tlsHandler from Config to App

* Use NewError instead of panic

* Add a test with ServerName

* Add some tests on ClientHelloInfo

* fix missing import

* remove unnecessary ctx field.

Co-authored-by: RW <rene@gofiber.io>
Co-authored-by: Muhammed Efe Çetin <efectn@protonmail.com>
2022-08-19 08:19:22 +02:00
Muhammed Efe Çetin cadd6014bb
v3: cleanup & update deps 2022-08-17 23:01:59 +03:00
M. Efe Çetin 95abdacba0
feature: add XML to context. (#2003)
*  feature: add XML to context.

* Update app.go
2022-08-16 08:05:35 +02:00
M. Efe Çetin eacde70294
v3 (feature): initial support for binding (#1981)
*  v3 (feature): initial support for binding

*  v3 (feature): initial support for binding #1981
use pointer/references instead of copies

*  v3 (feature): initial support for binding
embed bind into the ctx

*  v3 (feature): initial support for binding
- add URI binder.

*  v3 (feature): initial support for binding
- add response header binder.

*  v3 (feature): initial support for binding
- add response header binder.

*  v3 (feature): initial support for binding
- add cookie binder.

*  v3 (feature): initial support for binding
- custom binder support for body binding.
- test case for custom binder.

*  v3 (feature): initial support for binding
- add map[string][]string & map[string]string support for binders.

*  v3 (feature): initial support for binding
- fix Test_Bind_Header_Map

*  v3 (feature): initial support for binding
- Functional Should/Must

*  v3 (feature): initial support for binding
- custom struct validator support.

*  v3 (feature): initial support for binding
- README for binding.
- Docs for binding methods.

*  v3 (feature): initial support for binding
- Bind() -> BindVars(), Binding() -> Bind()

*  v3 (feature): initial support for binding
- fix doc problems

*  v3 (feature): initial support for binding
- fix doc problems

Co-authored-by: wernerr <rene@gofiber.io>
2022-08-08 09:16:08 +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
olongfen bad7001570
binds the param string to a struct use params tag (#1968)
* add: params parse

* fix: binds the param string to a struct use params tag
2022-07-06 12:42:54 +02:00
olongfen dfa24a0958
add: params parse (#1964) 2022-07-05 13:45:11 +02:00
Muhammed Efe Çetin 67b9542f3f
v3: rename protocol to scheme, add protocol to ctx (https://github.com/gofiber/fiber/issues/1828) 2022-06-21 17:24:34 +03: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 9490b72700
♻️ v3 (enhancement): change type of Render's bind param to Map 2022-06-04 14:28:26 +03:00
Muhammed Efe Çetin 8a15f77fc4
v3: move most deps to go.mod 2022-06-02 17:37:53 +03:00
Muhammed Efe Çetin f119794035
v3: replace io/ioutil by io and os, update version constant 2022-06-01 18:34:22 +03:00
Muhammed Efe Çetin c7f45ec38e
v3: replace interface{}s by any 2022-05-31 17:41:38 +03:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
Sujit Baniya 3bb4b7ed41
Fix GetLocationFromRoute bug for optional params (#1922)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go

* Add App Name function to pass custom app name

* Remove json tag for function

* Change func to string

* Add test for AppName

* Add RedirectToRoute and RedirectBack with fallback if referer in header not found

* replace errors.New with fmt.Errorf

* simplified code

* Add tests for different formats

* Add method to get route location and add benchmarks

* Add ToString function

* Fix error

* rearrange case for fmt.Stringer

* Fix bug for error return

* Lock latest route for app.Name(namee string)

* decreasing timeout for client test with timeout

* remove println and adjust condition to > 0

* Change name to get route url

* Change name to get route url

* Update ctx.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>

* Fix bug on getting url for optional and greedy params

* Fix greedy pattern

* This PR will fix #1921 (comment).

The optional and greedy params were not fetched correctly

* This PR will fix #1921 (comment).

The optional and greedy params were not fetched correctly

* This PR will fix #1921 (comment).

The optional and greedy params were not fetched correctly

Co-authored-by: RW <rene@gofiber.io>
Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
2022-05-31 13:58:13 +02:00
Artem Avanesov 061c2a9e12
fix typo for paramsInt function (#1913) 2022-05-24 02:05:55 +02:00
dependabot[bot] bf0673eb95
Bump github.com/valyala/fasthttp from 1.35.0 to 1.37.0 (#1882)
* Bump github.com/valyala/fasthttp from 1.35.0 to 1.36.0

Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.35.0 to 1.36.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.35.0...v1.36.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>

* Bump github.com/valyala/fasthttp from 1.35.0 to 1.36.0 #1882

* Bump github.com/valyala/fasthttp from 1.35.0 to 1.36.0 #1882

* Bump github.com/valyala/fasthttp from 1.35.0 to 1.36.0 #1882

* Bump github.com/valyala/fasthttp from 1.35.0 to 1.36.0 #1882

* Bump github.com/valyala/fasthttp from 1.35.0 to 1.36.0 #1882

* Bump github.com/valyala/fasthttp from 1.35.0 to 1.37.0 #1882

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wernerr <rene@gofiber.io>
2022-05-18 08:16:19 +02:00
ChandanChainani 941ada9f05
Fix cannot process array of values in `application/x-www-form-urlencoded` request (#1873)
* Renamed parseQuery to parseParamSquareBrackets

* Added square brackets processing for `application/x-www-form-urlencoded`

* Added test cases for Array of form values
2022-04-24 12:25:36 +02:00
TomRomeo bea756f624
✏️ Typo fix in ParamsInt() (#1863) 2022-04-16 15:32:25 -04:00
RW e9151e8ab8
Revert " feature: add SendFileWithConfig method to ctx (#1852)" (#1861)
This reverts commit f19ef67f73.
2022-04-15 15:54:18 +02:00
M. Efe Çetin c42af6d2ca
feature: support adding queries to RedirectToRoute (#1858)
* Support adding queries for RedirectToRoute method.

* fix security check.

*  feature: support adding queries to RedirectToRoute

Co-authored-by: wernerr <rene@gofiber.io>
2022-04-15 15:32:39 +02:00
M. Efe Çetin f19ef67f73
feature: add SendFileWithConfig method to ctx (#1852)
* add sendfilewithconfig.

* update

* shortify code.
2022-04-14 10:49:48 +02:00
M. Efe Çetin a63a842fb6
add allparams method. (#1853) 2022-04-14 10:48:41 +02:00
M. Efe Çetin ee65ea5bab
🧹 Use encoding/json (#1851)
* remove goccy/go-json

* fix tests.
2022-04-13 10:45:33 +02:00
Andrey Kuvshinov 16b8717a29
Add context Writef feature function (#1841) 2022-04-01 19:15:06 +02:00
Neenad Ingole 44bfdc3d6b
🩹 Allow parsing of square bracket query param (#1818) 2022-03-22 09:13:56 +01:00
Sujit Baniya af339a851f
Change name to get URL from (#1831)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go

* Add App Name function to pass custom app name

* Remove json tag for function

* Change func to string

* Add test for AppName

* Add RedirectToRoute and RedirectBack with fallback if referer in header not found

* replace errors.New with fmt.Errorf

* simplified code

* Add tests for different formats

* Add method to get route location and add benchmarks

* Add ToString function

* Fix error

* rearrange case for fmt.Stringer

* Fix bug for error return

* Lock latest route for app.Name(namee string)

* decreasing timeout for client test with timeout

* remove println and adjust condition to > 0

* Change name to get route url

* Change name to get route url

* Update ctx.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>

Co-authored-by: RW <rene@gofiber.io>
Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
2022-03-22 09:13:30 +01:00
Geet Manghnani a746e5bfb8
Restore Original URL of the context after changing it (#1788)
* Restore original URL after the proxy

* Use the Immutable string to restore

* Changing deprecated ImmutableString to CopyString

Co-authored-by: Geet Manghnani <gmanghna@in.ibm.com>
2022-02-20 21:59:47 +01:00
M. Efe Çetin 937713e41e
feature: bind support for render (#1754)
* Bind support for Render.

* update

* fix tests

* split Pass-locals-to-views & Bind from Render

* update comments.

* add benchs.

* Update ctx.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>

* Update ctx.go

* optimize

* switch dictpool.

*  feature: bind support for render
- improve performance

*  feature: bind support for render
- improve performance

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
Co-authored-by: wernerr <rene.werner@verivox.com>
Co-authored-by: wernerr <rene@gofiber.io>
2022-02-12 22:52:24 +01:00
Sujit Baniya 505e4d77a7
[FEATURE REQUEST] - Add RedirectToRoute and RedirectBack (#1750)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go

* Add App Name function to pass custom app name

* Remove json tag for function

* Change func to string

* Add test for AppName

* Add RedirectToRoute and RedirectBack with fallback if referer in header not found

* replace errors.New with fmt.Errorf

* simplified code

* Add tests for different formats

* Add method to get route location and add benchmarks

* Add ToString function

* Fix error

* rearrange case for fmt.Stringer

* Fix bug for error return

* Lock latest route for app.Name(namee string)

* decreasing timeout for client test with timeout

* remove println and adjust condition to > 0

Co-authored-by: RW <rene@gofiber.io>
2022-02-09 09:02:45 +01:00
Abhishek Mehandiratta 68fcd8c88f
Feature: Session Only Cookies (#1752)
* feat(ctx): add SessionOnly property on Cookie struct

* feat(middleware/config): add CookieSessionOnly property on middleware Config struct

* feat(csrf): link config CookieSessionOnly with fiber.Cookie in create middleware function

* fix(ctx_test): add tests for SessionOnly cookie in test_ctx_cookie

* fix(readme): update readme in csrf middleware for CookieSessionOnly property

* remove deprecated property from CookieSessionOnly explaination comments
2022-02-07 13:35:00 +01:00
M. Efe Çetin c450072f4a
🐛 fix: mounted app views (#1749)
* Fix mounted app views.

* Cleaner structure.

Co-authored-by: RW <rene@gofiber.io>

* remove unnecessary lines.

* Add test case for group-with-mount, remove unnecessary lines.

Co-authored-by: RW <rene@gofiber.io>
2022-02-06 14:58:45 +01:00
Matthias Neugebauer 8853190031
🔥 Feature: Add ability to restart route handling (#1739)
* 🔥 Feature: Add ability to restart route handling

* Change test names

Co-authored-by: RW <rene@gofiber.io>
2022-02-03 15:09:46 +01:00
Aliqyan Tapia 39a503cc1d
🚀 SaveFile to default External Storage (#1557)
* fiber change

* reference correct storage in SaveFile

* seperate logic to new function

* Change storage defination style, fix tests on go1.14

* Add unit test.

Co-authored-by: Alex Bakker <abakks@hotmail.com>
Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
2022-02-03 14:09:11 +01:00
M. Efe Çetin a51ec9bc69
🔥 Feature: Add ReqHeaderParser. (#1721)
* Add ReqHeaderParser.

* Cleanup and tidy up parser codes.

Co-authored-by: RW <rene@gofiber.io>

* Add benchmark for ReqHeaderParser.

* Revert collectVisitAllData

Co-authored-by: RW <rene@gofiber.io>
2022-01-24 20:41:37 +01:00
kingdevnl 82d1039416
feature: Pass all locals to ctx.Render (#1693)
* feature: Pass all locals to ctx.Render

* add test case for render using locals

* Added option PassLocalsToViews to enable pass locals to render

The option PassLocalsToViews is set to disabled by default

* Added a check to see if the ctx bind already contains the value

* Added a test for ctx render with locals and binds.
2022-01-24 08:29:46 +01:00
hi019 eee279bdb3
Fix using IP ranges in config.TrustedProxies (#1607) (#1614)
* Fix using IP ranges in config.TrustedProxies (#1607)

* Add tests

* Remove debugging var

* Remove tests

* Update test

Co-authored-by: RW <rene@gofiber.io>
2021-12-31 18:32:39 +01:00
M. Efe Çetin 59240b5493
Add GetRespHeader, GetReqHeaders and TagReqHeaders for logger mw (#1678)
* Add GetRespHeader & GetReqHeaders methods.

* Add TagReqHeaders for logger middleware.

* Update README.md
2021-12-31 13:03:08 +01:00
vecpeng bd19adc2c7
🔥Feature: add function to check if request came from localhost (#1671)
* 🔥Feature: add function to check if request came from localhost

* 🔥Feature: add function to check if request came from localhost
2021-12-28 16:02:25 +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
M. Efe Çetin 9eaa8b0c73
Change default json lib. (#1563)
* Change default json lib.

* Remove gopsutil test.

* Fix tests.

* Ignore linter for UnmarshalFieldError.

* update
2021-10-11 08:28:06 +02:00
Rock a9b66b328e
♻️ Option to overide form decoder setting - Rename function (#1555)
* 🔥 add function to overide form decoder setting

🔥 Feature : SetBodyParserDecoder map all option to form decoder, use with BodyParserConfig, BodyParserType

🚨 Test : Test_Ctx_BodyParser_WithSetBodyParserDecoder

* 🔥 Use decoder builder function with default setting on init decoderPool

* ♻️ rename SetBodyParserDecoder to SetParserDecoder

BodyParserType > ParserType
bodyParserConfig > parserConfig
BodyParserConfig > ParserConfig
2021-10-04 08:37:24 +02:00
Rock 35e38db771
🔥 Add function to override form decoder setting (#1100)
* 🔥 add function to overide form decoder setting

🔥 Feature : SetBodyParserDecoder map all option to form decoder, use with BodyParserConfig, BodyParserType

🚨 Test : Test_Ctx_BodyParser_WithSetBodyParserDecoder

* 🔥 Use decoder builder function with default setting on init decoderPool
2021-10-01 08:32:06 +02:00
Iván Valdés 26c29e248f
Restore original URL after sending file (#1553) 2021-10-01 08:30:47 +02:00
Thammachart Chinvarapon 842b63022d
🐛 Fix Mutability issue of UserContext in fiber.Ctx (#1522)
* existing tests clean up

* concurrent test for UserContext Reused

* comment on Ctx.userContext field

* userContext tests edited & fixed, userContext field removed, constant of userContextKey defined
2021-09-09 08:11:26 +02:00
Shirshendu Bhowmick d89207831d
🐛 Fix: ctx.BodyParser was not able to parse vendor specific content type (#1506) 2021-08-22 17:53:14 +02:00
Pranay 670170f7c5
📝 Update: Add JSONDecoder to config (#1489)
* 📝 Update: Add JSONDecoder to config
2021-08-18 14:26:07 +02:00
goldwind-ting 846d5a5b38
[Logger]: add tag for response header (#1446)
* add TagRespHeader to get response header

* #1422:add unittest

* #1422:adjust docs for logger middleware

* #1422:adjust docs for logger middleware
2021-08-04 08:19:41 +02:00
faceair 1e0d4d3b1c
🐛 fix parse gzipped body (#1458) 2021-07-30 08:02:02 +02:00
Vahagn Mkrtchyan f0ab2a5433
Add option to specify default values for ParamsInt (#1453) 2021-07-26 19:50:56 +02:00
Marcos de Oliveira 30ba99425f
Add ${port} logger variable (#1448)
* Add c.Addr() and c.Port() functions and logger port variable

* Add gofmt suggestion, README.md description and test

* Remove c.Addr() func and use c.fasthttp.RemoteAddr() instead
2021-07-22 17:42:29 +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
Oleg Roshnivskyy 5ba78cd24a
🔥 Feature: Add TrustedProxies feature (#1397)
* 🔥 Feature: Add TrustedProxies feature

Add TrustedProxies feature to prevent HTTP header spoofing.

* Update ctx.go

* Update app.go

* Update app.go

Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
2021-06-30 08:03:45 +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
Sujit Baniya cb5f2f7eab
🔥 Add Global ViewLayout (#1384)
* Add Global Layout for view render

* Add test case for Views Layout

* Update ctx_test.go
2021-06-14 11:10:49 +02:00
Kshitij Patil 8616b41517
🔥 Adding user context (#1341)
* Adding user context

* adding docblock

* correcting comments

* minor change in comment

* Update ctx.go

Co-authored-by: RW <rene@gofiber.io>
2021-05-24 00:46:52 -04:00
SianLoong da1877f16c
🏗️ chore: enable decoder's ZeroEmpty by default (#1285) 2021-05-17 15:46:36 +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
Eduardo Andrés Castillo Perera 47f44f3960
Add method to get an integer directly from the Ctx params (route params) (#1243)
* Created ParamsInt method in Ctx
* Created test for the ParamsInt method
* Recover accidentally removed comments
2021-03-28 15:49:51 +02:00
SianLoong 861e5d21fb
🐛 Fix unexpected result when `QueryParser` parse slice data type (#1238) 2021-03-24 20:12:57 +01:00
Yoofi Quansah 5941c8c4e2 🧹 chore: address comments, and use more standard definition for
functionality we define
2021-01-25 13:48:07 -06:00
Yoofi Quansah 2267f0f76f 🚀 feat: add custom definition for a json executor 2021-01-19 20:25:44 -08:00
ReneWerner87 c893e3243b 🐛 UnescapePath not working #1102
Co-authored-by: Fenny <fenny@gofiber.io>
2021-01-06 19:06:13 +01:00
ReneWerner87 4f5e57d8de 🐛 UnescapePath not working #1102
Co-authored-by: Fenny <fenny@gofiber.io>
2021-01-06 13:46:50 +01:00
ReneWerner87 e94e653ca7 🐛 UnescapePath not working #1102
Co-authored-by: Fenny <fenny@gofiber.io>
2021-01-06 13:24:26 +01:00
ReneWerner87 b51def0bb8 🐛 UnescapePath not working #1102
Co-authored-by: Fenny <fenny@gofiber.io>
2021-01-06 13:21:54 +01:00
Fenny 3242e5b151 🚀 allow incase-sensitive ctypes in bodyparser
Co-Authored-By: Mones Zarrugh <11161902+moneszarrugh@users.noreply.github.com>
2020-12-11 00:59:32 +01:00
Fenny a1879ceca8 🚧 refactor bodyparser
Co-Authored-By: Mones Zarrugh <11161902+moneszarrugh@users.noreply.github.com>

#1067
2020-12-11 00:56:54 +01: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
Fenny c9bbc9fc54 📚 update JSON description
Co-Authored-By: nickland03 <52105217+nickland03@users.noreply.github.com>
2020-11-01 10:46:19 +01:00
ckcks12 e0122f261c 🐛 queryparser: query args count based condition removed 2020-10-26 14:48:21 +09:00
ReneWerner87 d8961a7ed9 🐛 Fix (*Ctx).Accepts
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: navossoc <navossoc@gmail.com>
2020-10-24 20:06:13 +02:00
yonbiaoxiao d622469203 improve base uri for ctx 2020-10-19 14:01:34 +08:00
Fenny c0efbcd28c
Merge pull request #908 from hi019/master
🐛 Make SendFile return 404 if file not found
2020-10-10 16:26:21 +02:00
hi019 2c8df2e337 🎨 Use NewError in SendFile 2020-10-09 23:11:44 -04:00
hi019 b73e883241 🐛 Make SendFile return 404 if file not found 2020-10-09 21:42:25 -04:00
David Mazary 618b753230 🚨 Fix gosimple lint warnings 2020-10-03 13:20:54 -04:00
Fenny e5e9cf9201 🍪 add max-age to cookie 2020-09-30 15:31:46 +02:00
Fenny d6f717148a 🛠 correct convert naming 2020-09-27 12:22:17 +02:00
Fenny 3fbc1470c6 🏀 Support splitting in QueryParser
Co-Authored-By: Nathaniel Peiffer <nathaniel@peiffer.com.au>
2020-09-20 12:15:53 +02:00
Fenny cb7f084615
Merge pull request #812 from ReneWerner87/improveErrorHandling
☠️ Improve error handling flow
2020-09-19 09:19:31 +02:00
ReneWerner87 c822a17c72 ☠️ Improve error handling flow
Co-authored-by: Fenny <fenny@gofiber.io>
Co-authored-by: Kiyon <kiyon@gofiber.io>
2020-09-18 20:44:00 +02:00
Fenny 4163d4473a 📦 introduce WriteString 2020-09-18 11:52:06 +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 a09daabfee move utils to internal 2020-09-14 09:24:48 +02:00
Fenny a3cac71ae8 🔦 move utils to internal 2020-09-14 09:09:06 +02:00
Fenny 3d76f078a4 v2 2020-09-14 04:54:26 +02:00
Fenny 2951c6ac0d v2 2020-09-13 11:39:55 +02:00
Fenny ec5d66e7a8 v2 2020-09-13 11:20:11 +02:00
ReneWerner87 df3c48a734 🌵hybrid routing with tree and fast router 2020-08-10 10:51:38 +02:00
ReneWerner87 e802c41f41 Merge branch 'hybrid_routing' into improve_route_behavior 2020-08-10 10:14:31 +02:00
ReneWerner87 945b61d1c3 🌵hybrid routing with tree and fast router 2020-08-09 21:53:15 +02:00
ReneWerner87 d9c09fa68e 🚀 improve routing behavior 2020-08-09 19:50:10 +02:00
Fenny 797fe3a8e5 Set cType directly in Render 2020-07-31 14:01:37 +02:00
kiyon 7863cd1458 👷 add ctx.Render test cases 2020-07-29 11:07:47 +08:00
Fenny 87127f571a 🧹 Remove deprecated Templates 2020-07-28 04:36:56 +02:00
fenny d06256c944
Merge pull request #675 from larrylv/larrylv/improve_no_cache_header_matching
🚀 Don't use regexp for no-cache value check
2020-07-27 04:43:19 +02:00
Larry Lv fc85699a95
🧹 Refactor etag stale checking 2020-07-26 18:53:26 -07:00
Larry Lv fd75ef0fbe
🚀 Don't use regexp for no-cache value check 2020-07-25 22:35:43 -07:00
kiyon 4ebd887faa 🩹 when X-Forwarded-For is empty, ctx.Ips() should not return any(even empty) ip 2020-07-24 21:53:08 +08:00
Fenny cd3e37fc91 🧹 Improve BodyParser
Co-Authored-By: RW <renewerner87@googlemail.com>
Co-Authored-By: kiyon <kiyonlin@users.noreply.github.com>
2020-07-21 22:50:12 +02:00
fenny 6616950649
Merge pull request #657 from ReneWerner87/improve_ctxIs
 Improve ctx.Is performance
2020-07-21 22:24:02 +02:00
ReneWerner87 aafa784bbb Improve ctx.Is performance 2020-07-21 21:28:13 +02:00
Fenny 2f87bf9005 🍻 Update Query condition
Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
2020-07-21 21:23:22 +02:00
ReneWerner87 88b4da6a03 Improve ctx.Is performance 2020-07-21 21:09:51 +02:00
Fenny 9dc4d9faeb ✏ Fix deprecation message 2020-07-21 20:46:42 +02:00
Fenny ae959fae5a 🧉 Allow missing space in Content-Type's using BodyParser
Co-Authored-By: RW <renewerner87@googlemail.com>
2020-07-21 19:43:32 +02:00
Hemanth Krishna f695e21b1e ✏️ Fix typo for app and ctx warnings 2020-07-18 20:19:42 +05:30
fenny c84ae11e26
Merge pull request #630 from kiyonlin/fix-625
👷 fixed ctx.Render bug
2020-07-17 19:27:42 +02:00
kiyon 762b00f7d0 👷 fixed #625 2020-07-17 10:05:01 +08:00
kiyon c89bfb3634 🔔 fix ctx matched bug, it should be reset to false when acquired 2020-07-17 09:34:27 +08:00
ReneWerner87 9ec400b5d5 🚀 improve ctx.Render performance -> reduce allocation (if app is started as non-immutable) 2020-07-16 11:12:50 +02:00
ReneWerner87 89f929fcb0 🚀 improve ctx.Links performance -> reduce allocation (if app is started as non-immutable) 2020-07-16 11:02:36 +02:00
kiyon df19f6d933 👷 fix data race in sendFile test 2020-07-16 09:00:20 +08:00
fenny a2f2e76c3d
Merge pull request #619 from Fenny/master
🧫 Add TLS tests
2020-07-15 13:10:14 -04:00
Fenny ca18303938 🧪 Increase test coverage: 96.4% 2020-07-15 18:01:05 +02:00
fenny c5efb6d6c6
Merge pull request #616 from kiyonlin/improve-body-parser-performance
🚀 improve ctx.BodyParser performance
2020-07-15 10:33:07 -04:00
kiyon 495d1b7cbf 🚀 improve ctx.BodyParser performance 2020-07-15 22:00:56 +08:00
Fenny ad2052cf8f 🚀 Improve Send 2020-07-15 15:26:05 +02:00
fenny b11568bbef
Merge pull request #610 from kiyonlin/improve-query-parser-performance
🚀 improve ctx.QueryParser performance
2020-07-15 08:18:41 -04:00
fenny 4e810030e4
Merge pull request #611 from kiyonlin/improve-ctx-coverage
💯 improve ctx test coverage
2020-07-15 08:18:17 -04:00
kiyon f95ca9a9ff 🚀 improve ctx.Ips performance 2020-07-15 15:59:10 +08:00
kiyon 558917f147 💯 cover error statement 2020-07-15 14:22:31 +08:00
kiyon e5204f4738 🚀 improve ctx.QueryParser performance 2020-07-15 12:57:56 +08:00
fenny 8605857678
🚀 refactor: improve logic method BodyParser
🚀 refactor: improve logic method BodyParser
2020-07-14 22:55:20 -04:00
renanbastos93 d61e478578 🚀 refactor: improve logic method BodyParser 2020-07-14 12:18:44 -03:00
fenny 155e6a0673
Merge pull request #606 from ReneWerner87/fix_append_bug
🐞 prevent duplicates in ctx.Append for similar wording of the value
2020-07-14 08:02:12 -04:00
ReneWerner87 4035b17ee0 🐞 prevent duplicates in ctx.Append for similar wording of the value 2020-07-14 12:23:11 +02:00
kiyon 3156fcca3d 🍤 improve ctx test coverage 2020-07-14 15:24:24 +08:00
Fenny bb5ad54658 ⚠ Add deprecation message 2020-07-13 15:45:34 +02:00
Fenny b9deefbba1 Merge remote-tracking branch 'upstream/master' 2020-07-13 15:37:49 +02:00
Fenny 0361df3cab 🧹 Update description 2020-07-13 15:37:38 +02:00
fenny 96d5286e9d
Merge pull request #597 from kiyonlin/invalid-method
💫 short the invalid method check
2020-07-13 05:43:36 -04:00
kiyon eb0bc94393 💫 short the invalid method check 2020-07-13 16:47:15 +08:00
kiyon 9d9cfa8424 🚨 extract func quoteString() for ctx.Attachment and ctx.Download 2020-07-13 12:37:50 +08:00
fenny 681b1bc685
Merge pull request #593 from kinbiko/docs-improvements
📚 Docs improvements
2020-07-12 16:10:19 -04:00
kiyon de7a0357a6 🚀 Better performance for ctx.Attachment 2020-07-13 00:38:01 +08:00
Roger Guldbrandsen c6ff695762
📚Clean up ctx.go docs
- Use full sentences for context pool management methods.
- Full stop after each sentence (wherever I am confident of the intended meaning).
- Grammar fixes.
- Use single quote (') over fancy formatted apostrophe (’).
- Remove useless and incorrect comment on global variable
2020-07-13 01:35:17 +09:00
renanbastos93 4470d77295 📦 feat: method QueryParser in context 2020-07-11 14:38:21 -03:00