Software /
code /
prosody
Comparison
plugins/mod_http.lua @ 4717:3c0321e3fa76
mod_http: Remove unused import of url.parse
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 26 Apr 2012 16:53:32 +0100 |
parent | 4702:5a85e541de1a |
child | 4720:fddc2797a96a |
comparison
equal
deleted
inserted
replaced
4716:6eeb142a8073 | 4717:3c0321e3fa76 |
---|---|
6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
7 -- | 7 -- |
8 | 8 |
9 module:set_global(); | 9 module:set_global(); |
10 | 10 |
11 local parse_url = require "socket.url".parse; | |
12 local server = require "net.http.server"; | 11 local server = require "net.http.server"; |
13 | 12 |
14 local function normalize_path(path) | 13 local function normalize_path(path) |
15 if path:sub(1,1) ~= "/" then path = "/"..path; end | 14 if path:sub(1,1) ~= "/" then path = "/"..path; end |
16 if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end | 15 if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end |