Comparison

mod_http_altconnect/mod_http_altconnect.lua @ 1291:1ac28a953e5f

mod_http_altconnect: Send XML declaration
author Kim Alvefur <zash@zash.se>
date Sat, 25 Jan 2014 20:20:17 +0100
parent 1290:c0957b904487
child 1323:c84ff82658cb
comparison
equal deleted inserted replaced
1290:c0957b904487 1291:1ac28a953e5f
28 for i, method in ipairs(uris) do 28 for i, method in ipairs(uris) do
29 xrd:tag("Link", method):up(); 29 xrd:tag("Link", method):up();
30 end 30 end
31 response.headers.content_type = "application/xrd+xml" 31 response.headers.content_type = "application/xrd+xml"
32 response.headers.access_control_allow_origin = "*"; 32 response.headers.access_control_allow_origin = "*";
33 return tostring(xrd); 33 return '<?xml version="1.0" encoding="UTF-8"?>' .. tostring(xrd);
34 end 34 end
35 35
36 local function GET_json(event) 36 local function GET_json(event)
37 local request, response = event.request, event.response; 37 local request, response = event.request, event.response;
38 local jrd = { links = get_supported() }; 38 local jrd = { links = get_supported() };