body length

This commit is contained in:
zeke
2021-12-02 12:08:29 +08:00
parent 1a68efe2fc
commit 8cb38d3af8
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ type Gzip struct {
} }
func (g *Gzip) DoFilter(ctx http_service.IHttpContext, next http_service.IChain) (err error) { func (g *Gzip) DoFilter(ctx http_service.IHttpContext, next http_service.IChain) (err error) {
head := ctx.Request().Header().GetHeader("Accept-encoding") head := ctx.Request().Header().GetHeader("Accept-Encoding")
if next != nil { if next != nil {
err = next.DoChain(ctx) err = next.DoChain(ctx)
} }

View File

@@ -26,7 +26,7 @@ func NewResponse(ctx *fasthttp.RequestCtx) *Response {
} }
func (r *Response) BodyLen() int { func (r *Response) BodyLen() int {
return r.header.Len() return r.header.ContentLength()
} }
func (r *Response) GetBody() []byte { func (r *Response) GetBody() []byte {