toastdriven/itty — pull request #18 by gnrfan (2013-03-03 15:26:12+00:00)
Title: Adding support for returning a 405 status code instead of 404

... that is when the HTTP method used in the request is not supported by the framework.

Using the example in the README file and curl as the client.

Before the patch:
```
$ curl -XBOOM -vv http://localhost:8080/something
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> BOOM /something HTTP/1.1
> User-Agent: curl/7.27.0
> Host: localhost:8080
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 404 NOT FOUND
< Date: Sun, 03 Mar 2013 15:24:46 GMT
< Server: WSGIServer/0.1 Python/2.7.3
< Content-Type: text/plain; charset=utf-8
<
* Closing connection #0
Not Found
```

After the patch:

```
$ curl -XBOOM -vv http://localhost:8080/something
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> BOOM /something HTTP/1.1
> User-Agent: curl/7.27.0
> Host: localhost:8080
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 405 METHOD NOT ALLOWED
< Date: Sun, 03 Mar 2013 15:26:15 GMT
< Server: WSGIServer/0.1 Python/2.7.3
< Content-Type: text/plain; charset=utf-8
<
* Closing connection #0
Method Not Allowed
```