1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

respect the iris.WithEmptyFormError option on Context.ReadQuery too

as requested at: #1727
This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-02-14 13:40:56 +02:00
parent d26b9bfbed
commit 567c06702f
6 changed files with 28 additions and 7 deletions

View File

@@ -731,7 +731,7 @@ type Configuration struct {
//
// See `Context.RecordRequestBody` method for the same feature, per-request.
DisableBodyConsumptionOnUnmarshal bool `ini:"disable_body_consumption" json:"disableBodyConsumptionOnUnmarshal,omitempty" yaml:"DisableBodyConsumptionOnUnmarshal" toml:"DisableBodyConsumptionOnUnmarshal"`
// FireEmptyFormError returns if set to tue true then the `context.ReadBody/ReadForm`
// FireEmptyFormError returns if set to tue true then the `context.ReadForm/ReadQuery/ReadBody`
// will return an `iris.ErrEmptyForm` on empty request form data.
FireEmptyFormError bool `ini:"fire_empty_form_error" json:"fireEmptyFormError,omitempty" yaml:"FireEmptyFormError" toml:"FireEmptyFormError"`