chriso/klein.php — pull request #58 by Rican7 (2012-11-29 07:47:00+00:00)
Title: HTTP/1.1 - 405 Error Compliance

The **HTTP/1.1** Standard dictates that a **405** error **must** contain a header called **Allow**, that lists (comma and space delimited) the **allowed methods** of that particular endpoint.

This pull-request adds the appropriate header on a 405 error condition.

"An Allow header field MUST be present in a 405 (Method Not Allowed) response."

Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7

.........
_Also, I snuck in some performance enhancing/fixing for the 405 method array creation._