Skip to content

Conversation

@etcinit
Copy link
Contributor

@etcinit etcinit commented Feb 14, 2015

While I was trying to get the VerifyCsrfToken middleware to work optionally using $routeMiddleware, I noticed that middleware declared in $routeMiddleware instead of $middleware does not get a response object when $next($response) is called (at least not every time), instead it gets whatever the controller or route handler returned (a View object in most cases).

The proposed change below makes sure the response is prepared before it goes back through the route middleware pipeline

Also, some spaces to tabs conversion

@GrahamCampbell
Copy link
Collaborator

Please don't change all the indentation.

@taylorotwell
Copy link
Member

Hmm, this might should be considered more of a bug, and thus should go into 5.0 branch.

@etcinit
Copy link
Contributor Author

etcinit commented Feb 16, 2015

Ok, reapplied the commits to 5.0. New PR #7454

@etcinit etcinit closed this Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants