Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
moved gorilla.context.Clear from app serveHttp to handler serveHttp
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Hust authored and markbates committed Sep 5, 2017
1 parent 64f0184 commit 03ac98e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"sync"
"syscall"

gcontext "github.com/gorilla/context"
"github.com/gorilla/mux"
"github.com/markbates/refresh/refresh/web"
"github.com/markbates/sigtx"
Expand Down Expand Up @@ -101,7 +100,6 @@ func (a *App) Stop(err error) error {
}

func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer gcontext.Clear(r)
ws := &Response{
ResponseWriter: w,
}
Expand Down
2 changes: 2 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package buffalo
import (
"net/http"

gcontext "github.com/gorilla/context"
"github.com/gorilla/mux"
"github.com/pkg/errors"
)
Expand Down Expand Up @@ -63,6 +64,7 @@ func (a *App) newContext(info RouteInfo, res http.ResponseWriter, req *http.Requ
}

func (info RouteInfo) ServeHTTP(res http.ResponseWriter, req *http.Request) {
defer gcontext.Clear(req)
a := info.App

c := a.newContext(info, res, req)
Expand Down

0 comments on commit 03ac98e

Please sign in to comment.