Skip to content

Commit

Permalink
Ignore case when parsing the "Connection" header in the HTTP client. F…
Browse files Browse the repository at this point in the history
…ixes #1426.
  • Loading branch information
s-ludwig committed Feb 14, 2016
1 parent 0521008 commit e4b4860
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/vibe/http/client.d
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,10 @@ final class HTTPClientResponse : HTTPResponse {

private @property isKeepAliveResponse()
const {
if (this.httpVersion == HTTPVersion.HTTP_1_0) return this.headers.get("Connection", "close") != "close";
else return this.headers.get("Connection", "keep-alive") != "close";
string conn;
if (this.httpVersion == HTTPVersion.HTTP_1_0) conn = this.headers.get("Connection", "close");
else conn = this.headers.get("Connection", "keep-alive");
return icmp(conn, "close") != 0;
}

private void finalize()
Expand Down

0 comments on commit e4b4860

Please sign in to comment.