daylerees / anbu

Anbu profiler for the Laravel PHP Framework.
308 stars 24 forks source link

Fix redirects #15

Closed barryvdh closed 10 years ago

barryvdh commented 10 years ago
  1. Don't append data to redirects.
  2. Don't echo output, that kills the headers.
barryvdh commented 10 years ago

And you should probably try to inject it in the body, instead of just appending it. And when you use a Middleware you could probably catch errors as well (not sure if that is possible with After filters in the latest version)

daylerees commented 10 years ago

That makes sense. Thanks man. Surprised the body of the request interferes with the header though.

barryvdh commented 10 years ago

Hmm, probably when you echo, the data is ouputted before the headers are sent properly. Same reason you should echo stuff in controllers, but just return the content. Same goes for filters etc.

daylerees commented 10 years ago

Guess so. Thanks dude :)