Fix connection always closed

In the case where the response contains a `Connection` header and `persistent` is enabled the socket will always be reset. This PR fixes that by exercising the `Connection` header checking code and ensuring that `String#casecmp` returns a match.

/cc @burns