From 030a9a4ad1ab8385586473ededc50f2e13f23a28 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Tue, 15 Mar 2016 15:55:46 -0700 Subject: [PATCH] #407, just fixed fasthttp response writer Signed-off-by: Vishal Rana --- context.go | 2 +- engine/fasthttp/response.go | 2 +- engine/fasthttp/server.go | 2 +- engine/standard/server.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/context.go b/context.go index 086e01dc..d293e295 100644 --- a/context.go +++ b/context.go @@ -182,7 +182,7 @@ func (c *context) Get(key string) interface{} { return c.store[key] } -// Bind binds the request body into specified type `i`. The default binder does +// Bind binds the request body into provided type `i`. The default binder does // it based on Content-Type header. func (c *context) Bind(i interface{}) error { return c.echo.binder.Bind(i, c) diff --git a/engine/fasthttp/response.go b/engine/fasthttp/response.go index 8c5c2a66..6c4f39be 100644 --- a/engine/fasthttp/response.go +++ b/engine/fasthttp/response.go @@ -42,7 +42,7 @@ func (r *Response) WriteHeader(code int) { // Write implements `engine.Response#Write` method. func (r *Response) Write(b []byte) (int, error) { - return r.RequestCtx.Write(b) + return r.writer.Write(b) } // Status implements `engine.Response#Status` method. diff --git a/engine/fasthttp/server.go b/engine/fasthttp/server.go index 1aaabb36..a03fbe40 100644 --- a/engine/fasthttp/server.go +++ b/engine/fasthttp/server.go @@ -29,7 +29,7 @@ type ( } ) -// New returns an instance of `fasthttp.Server` with specified listen address. +// New returns an instance of `fasthttp.Server` with provided listen address. func New(addr string) *Server { c := engine.Config{Address: addr} return NewFromConfig(c) diff --git a/engine/standard/server.go b/engine/standard/server.go index 45d59efb..bb92bc76 100644 --- a/engine/standard/server.go +++ b/engine/standard/server.go @@ -27,7 +27,7 @@ type ( } ) -// New returns an instance of `standard.Server` with specified listen address. +// New returns an instance of `standard.Server` with provided listen address. func New(addr string) *Server { c := engine.Config{Address: addr} return NewFromConfig(c)