Comparison

plugins/mod_websocket.lua @ 6894:f7203c7cb7ff

mod_websocket: Silence luacheck warnings
author Kim Alvefur <zash@zash.se>
date Tue, 06 Oct 2015 15:30:25 +0200
parent 6893:861790282dda
child 7294:5f4d0753c818
comparison
equal deleted inserted replaced
6893:861790282dda 6894:f7203c7cb7ff
2 -- Copyright (C) 2012-2014 Florian Zeitz 2 -- Copyright (C) 2012-2014 Florian Zeitz
3 -- 3 --
4 -- This project is MIT/X11 licensed. Please see the 4 -- This project is MIT/X11 licensed. Please see the
5 -- COPYING file in the source package for more information. 5 -- COPYING file in the source package for more information.
6 -- 6 --
7 -- luacheck: ignore 431/log
7 8
8 module:set_global(); 9 module:set_global();
9 10
10 local add_task = require "util.timer".add_task; 11 local add_task = require "util.timer".add_task;
11 local add_filter = require "util.filters".add_filter; 12 local add_filter = require "util.filters".add_filter;
128 return oc:top_tag(); 129 return oc:top_tag();
129 end 130 end
130 131
131 return data; 132 return data;
132 end 133 end
133 function handle_request(event, path) 134 function handle_request(event)
134 local request, response = event.request, event.response; 135 local request, response = event.request, event.response;
135 local conn = response.conn; 136 local conn = response.conn;
136 137
137 if not request.headers.sec_websocket_key then 138 if not request.headers.sec_websocket_key then
138 response.headers.content_type = "text/html"; 139 response.headers.content_type = "text/html";