comparison mod_invites_register_web/mod_invites_register_web.lua @ 4129:ca099bd28bf5

mod_invites_page, mod_invites_register_web: Set correct Content-Type everywhere necessary
author Matthew Wild <mwild1@gmail.com>
date Tue, 15 Sep 2020 14:11:48 +0100
parents 559ca8d93302
children 3a03ae9a0882
comparison
equal deleted inserted replaced
4128:879955a32a37 4129:ca099bd28bf5
32 ["Location"] = invites.module:http_url().."?"..(event.request.url.query or ""); 32 ["Location"] = invites.module:http_url().."?"..(event.request.url.query or "");
33 }; 33 };
34 }; 34 };
35 end 35 end
36 36
37 event.response.headers["Content-Type"] = "text/html; charset=utf-8";
38
37 local invite_page = render_html_template(register_page_template, { 39 local invite_page = render_html_template(register_page_template, {
38 site_name = site_name; 40 site_name = site_name;
39 token = invite.token; 41 token = invite.token;
40 domain = module.host; 42 domain = module.host;
41 uri = invite.uri; 43 uri = invite.uri;
64 ["Location"] = invites_page.module:http_url().."?"..event.request.url.query; 66 ["Location"] = invites_page.module:http_url().."?"..event.request.url.query;
65 }; 67 };
66 }; 68 };
67 end 69 end
68 70
69 response.headers.content_type = "text/html; charset=utf-8"; 71 event.response.headers["Content-Type"] = "text/html; charset=utf-8";
70 72
71 if not user or #user == 0 or not password or #password == 0 or not token then 73 if not user or #user == 0 or not password or #password == 0 or not token then
72 return render_html_template(register_page_template, { 74 return render_html_template(register_page_template, {
73 site_name = site_name; 75 site_name = site_name;
74 token = invite.token; 76 token = invite.token;