Comparison

net/http/server.lua @ 5489:421c7830eccc

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 18 Apr 2013 00:10:52 +0100
parent 5487:03ddf2375d48
child 5503:91052e59375c
comparison
equal deleted inserted replaced
5483:ed10252ee9c3 5489:421c7830eccc
157 157
158 local date_header = os_date('!%a, %d %b %Y %H:%M:%S GMT'); -- FIXME use 158 local date_header = os_date('!%a, %d %b %Y %H:%M:%S GMT'); -- FIXME use
159 local conn_header = request.headers.connection; 159 local conn_header = request.headers.connection;
160 conn_header = conn_header and ","..conn_header:gsub("[ \t]", ""):lower().."," or "" 160 conn_header = conn_header and ","..conn_header:gsub("[ \t]", ""):lower().."," or ""
161 local httpversion = request.httpversion 161 local httpversion = request.httpversion
162 local persistent = conn_header:find(",keep-alive,", 1, true) 162 local persistent = conn_header:find(",Keep-Alive,", 1, true)
163 or (httpversion == "1.1" and not conn_header:find(",close,", 1, true)); 163 or (httpversion == "1.1" and not conn_header:find(",close,", 1, true));
164 164
165 local response_conn_header; 165 local response_conn_header;
166 if persistent then 166 if persistent then
167 response_conn_header = "Keep-Alive"; 167 response_conn_header = "Keep-Alive";