Comparison

net/http/server.lua @ 5420:706053e3f9f5

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Apr 2013 13:53:21 +0100
parent 5404:ae9a47e579d7
child 5439:bd7b314c2301
comparison
equal deleted inserted replaced
5400:dd91b72a3ba0 5420:706053e3f9f5
217 end 217 end
218 elseif result_type == "string" then 218 elseif result_type == "string" then
219 body = result; 219 body = result;
220 elseif result_type == "table" then 220 elseif result_type == "table" then
221 for k, v in pairs(result) do 221 for k, v in pairs(result) do
222 response[k] = v; 222 if k ~= "headers" then
223 response[k] = v;
224 else
225 for header_name, header_value in pairs(v) do
226 response.headers[header_name] = header_value;
227 end
228 end
223 end 229 end
224 end 230 end
225 response:send(body); 231 response:send(body);
226 end 232 end
227 return; 233 return;