kazuho/Starlet — pull request #18 by hiratara (2014-12-31 04:18:56+00:00)
Title: Don't warn when we get invalid request lines

When I send an invalid request to Starlet, I get following warnings. If someone sends such requests many times, my log file will be filled with this message.

```
% carton exec -- local/bin/plackup -Ilib -s Starlet -e 'sub { [200, [], ["OK"]] }'
Plack::Handler::Starlet: Accepting connections at http://0:5000/
Use of uninitialized value $protocol in string eq at lib/Starlet/Server.pm line 411.
Use of uninitialized value $protocol in string eq at lib/Starlet/Server.pm line 428.
```

```
% telnet localhost 5000
Connected to localhost.
Escape character is '^]'.
GET /invalid request line/ HTTP/1.0

HTTP/1.1 400 Bad Request
Date: Wed, 31 Dec 2014 04:08:54 GMT
Server: Plack::Handler::Starlet
Content-Type: text/plain

Bad RequestConnection closed by foreign host.
```

My patch stops these messages and returns `Connection: closed` header to disconnect the keep-alive connection.