blob: 5b49d1d0802e543599663ac0b63c0956aefce939 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-- Prosody IM
-- Copyright (C) 2013 Florian Zeitz
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local http = {};
function http.contains_token(field, token)
field = ","..field:gsub("[ \t]", ""):lower()..",";
return field:find(","..token:lower()..",", 1, true) ~= nil;
end
return http;
|