christianklisch / slim-minify

PHP slim framework middleware to minify HTML output
MIT License
37 stars 9 forks source link

Redirects return blank page with HTTP 200 status #11

Closed zimozy closed 5 years ago

zimozy commented 6 years ago

I couldn't perform redirects: return $response->withRedirect('/page'); I'd get a blank page with an HTTP 200 status code.

I was able to fix this on my machine by changing $next($request,$response); to $response = $next($request,$response);

(Since the Response is immutable as per the user guide.)

jissereitsma commented 5 years ago

Thanks @zimozy for finding this. I bumped into the same issue. @christianklisch, is this still something you want to maintain? Middleware under Slim 3 requires the solution that @zimozy suggested.