Software /
code /
prosody
Comparison
util/http.lua @ 5299:cc9d460aa779
util.http: New module for HTTP helper functions
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Sat, 12 Jan 2013 16:55:39 +0100 |
child | 5458:84162b81c863 |
comparison
equal
deleted
inserted
replaced
5298:6d34ed9fce69 | 5299:cc9d460aa779 |
---|---|
1 -- Prosody IM | |
2 -- Copyright (C) 2013 Florian Zeitz | |
3 -- | |
4 -- This project is MIT/X11 licensed. Please see the | |
5 -- COPYING file in the source package for more information. | |
6 -- | |
7 | |
8 local http = {}; | |
9 | |
10 function http.contains_token(field, token) | |
11 field = ","..field:gsub("[ \t]", ""):lower()..","; | |
12 return field:find(","..token:lower()..",", 1, true) ~= nil; | |
13 end | |
14 | |
15 return http; |