Software /
code /
prosody
Changeset
5487:03ddf2375d48
net.http.server: The correct Connection header value to look for is Keep-Alive, not keep-alive.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 17 Apr 2013 15:28:20 -0400 |
parents | 5486:bcf27dbef6c6 |
children | 5488:0880a079d830 |
files | net/http/server.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http/server.lua Tue Apr 16 18:18:22 2013 -0400 +++ b/net/http/server.lua Wed Apr 17 15:28:20 2013 -0400 @@ -159,7 +159,7 @@ local conn_header = request.headers.connection; conn_header = conn_header and ","..conn_header:gsub("[ \t]", ""):lower().."," or "" local httpversion = request.httpversion - local persistent = conn_header:find(",keep-alive,", 1, true) + local persistent = conn_header:find(",Keep-Alive,", 1, true) or (httpversion == "1.1" and not conn_header:find(",close,", 1, true)); local response_conn_header;