mirror of
https://github.com/kataras/iris.git
synced 2025-03-21 12:36:25 +01:00
Former-commit-id: fca9db43ad6d78fcf01acf8edeadc12abc34195f
This commit is contained in:
parent
db0702ca75
commit
275cc14e39
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
11.2.0:https://dev.to/kataras/iris-version-11-2-released-22bc
|
11.2.1:https://dev.to/kataras/iris-version-11-2-released-22bc
|
|
@ -3003,6 +3003,7 @@ func (ctx *context) JSON(v interface{}, opts ...JSON) (n int, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
ctx.Application().Logger().Debugf("JSON: %v", err)
|
||||||
ctx.StatusCode(http.StatusInternalServerError) // it handles the fallback to normal mode here which also removes the gzip headers.
|
ctx.StatusCode(http.StatusInternalServerError) // it handles the fallback to normal mode here which also removes the gzip headers.
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
@ -3011,6 +3012,7 @@ func (ctx *context) JSON(v interface{}, opts ...JSON) (n int, err error) {
|
||||||
|
|
||||||
n, err = WriteJSON(ctx.writer, v, options, ctx.shouldOptimize())
|
n, err = WriteJSON(ctx.writer, v, options, ctx.shouldOptimize())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
ctx.Application().Logger().Debugf("JSON: %v", err)
|
||||||
ctx.StatusCode(http.StatusInternalServerError)
|
ctx.StatusCode(http.StatusInternalServerError)
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
@ -3073,6 +3075,7 @@ func (ctx *context) JSONP(v interface{}, opts ...JSONP) (int, error) {
|
||||||
|
|
||||||
n, err := WriteJSONP(ctx.writer, v, options, ctx.shouldOptimize())
|
n, err := WriteJSONP(ctx.writer, v, options, ctx.shouldOptimize())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
ctx.Application().Logger().Debugf("JSONP: %v", err)
|
||||||
ctx.StatusCode(http.StatusInternalServerError)
|
ctx.StatusCode(http.StatusInternalServerError)
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
@ -3118,6 +3121,7 @@ func (ctx *context) XML(v interface{}, opts ...XML) (int, error) {
|
||||||
|
|
||||||
n, err := WriteXML(ctx.writer, v, options)
|
n, err := WriteXML(ctx.writer, v, options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
ctx.Application().Logger().Debugf("XML: %v", err)
|
||||||
ctx.StatusCode(http.StatusInternalServerError)
|
ctx.StatusCode(http.StatusInternalServerError)
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
@ -3150,6 +3154,7 @@ func (ctx *context) Markdown(markdownB []byte, opts ...Markdown) (int, error) {
|
||||||
|
|
||||||
n, err := WriteMarkdown(ctx.writer, markdownB, options)
|
n, err := WriteMarkdown(ctx.writer, markdownB, options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
ctx.Application().Logger().Debugf("Markdown: %v", err)
|
||||||
ctx.StatusCode(http.StatusInternalServerError)
|
ctx.StatusCode(http.StatusInternalServerError)
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
@ -3161,6 +3166,7 @@ func (ctx *context) Markdown(markdownB []byte, opts ...Markdown) (int, error) {
|
||||||
func (ctx *context) YAML(v interface{}) (int, error) {
|
func (ctx *context) YAML(v interface{}) (int, error) {
|
||||||
out, err := yaml.Marshal(v)
|
out, err := yaml.Marshal(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
ctx.Application().Logger().Debugf("YAML: %v", err)
|
||||||
ctx.StatusCode(http.StatusInternalServerError)
|
ctx.StatusCode(http.StatusInternalServerError)
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
2
iris.go
2
iris.go
|
@ -37,7 +37,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Version is the current version number of the Iris Web Framework.
|
// Version is the current version number of the Iris Web Framework.
|
||||||
Version = "11.2.0"
|
Version = "11.2.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HTTP status codes as registered with IANA.
|
// HTTP status codes as registered with IANA.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user