v0.0.229
This commit is contained in:
parent
87a004e577
commit
655d4daad9
@ -5,10 +5,8 @@ import (
|
|||||||
"gogs.mikescher.com/BlackForestBytes/goext/dataext"
|
"gogs.mikescher.com/BlackForestBytes/goext/dataext"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BodyBuffer() gin.HandlerFunc {
|
func BodyBuffer(g *gin.Context) {
|
||||||
return func(g *gin.Context) {
|
if g.Request.Body != nil {
|
||||||
if g.Request.Body != nil {
|
g.Request.Body = dataext.NewBufferedReadCloser(g.Request.Body)
|
||||||
g.Request.Body = dataext.NewBufferedReadCloser(g.Request.Body)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ func (w *GinRouteBuilder) Handle(handler WHandlerFunc) {
|
|||||||
|
|
||||||
if w.routes.wrapper.bufferBody {
|
if w.routes.wrapper.bufferBody {
|
||||||
arr := make([]gin.HandlerFunc, 0, len(w.handlers)+1)
|
arr := make([]gin.HandlerFunc, 0, len(w.handlers)+1)
|
||||||
arr = append(arr, BodyBuffer())
|
arr = append(arr, BodyBuffer)
|
||||||
arr = append(arr, w.handlers...)
|
arr = append(arr, w.handlers...)
|
||||||
w.handlers = arr
|
w.handlers = arr
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package goext
|
package goext
|
||||||
|
|
||||||
const GoextVersion = "0.0.228"
|
const GoextVersion = "0.0.229"
|
||||||
|
|
||||||
const GoextVersionTimestamp = "2023-08-08T15:33:52+0200"
|
const GoextVersionTimestamp = "2023-08-08T16:05:44+0200"
|
||||||
|
Loading…
Reference in New Issue
Block a user