chriso/klein.php — pull request #57 by Rican7 (2012-11-29 07:36:25+00:00)
Title: Fix Nginx HTTP Status Header

Unlike Apache, Nginx doesn't automatically fill in the status message for a newly written HTTP Status header. This quick edit fixes this by using the new built-in PHP Status header function.

Here's a quick image, showing the *before* and *after* of my fix, as it effects the header:

![](http://new.tinygrab.com/3f00c7451031aeafc17075baa14e272d173b6a3a71.png)
_( Pay attention to the first line in each curl response)_

#### Now using new PHP 5.4 "http_response_code" function

This automatically creates the proper HTTP Status header (with status
code AND message), making it much more compatible with Nginx (since
nginx doesn't automatically grab the status message of Status headers)