Software /
code /
prosody
Diff
net/http/server.lua @ 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 |
parent | 5439:bd7b314c2301 |
child | 5503:91052e59375c |
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;