Comparison

net/http/parser.lua @ 12974:ba409c67353b

net: Prefix module imports with prosody namespace
author Kim Alvefur <zash@zash.se>
date Fri, 17 Mar 2023 16:23:12 +0100
parent 12889:94a99330ce87
child 13379:977d92aff563
comparison
equal deleted inserted replaced
12973:cc215923297f 12974:ba409c67353b
1 local tonumber = tonumber; 1 local tonumber = tonumber;
2 local assert = assert; 2 local assert = assert;
3 local url_parse = require "socket.url".parse; 3 local url_parse = require "socket.url".parse;
4 local urldecode = require "util.http".urldecode; 4 local urldecode = require "prosody.util.http".urldecode;
5 local dbuffer = require "util.dbuffer"; 5 local dbuffer = require "prosody.util.dbuffer";
6 6
7 local function preprocess_path(path) 7 local function preprocess_path(path)
8 path = urldecode((path:gsub("//+", "/"))); 8 path = urldecode((path:gsub("//+", "/")));
9 if path:sub(1,1) ~= "/" then 9 if path:sub(1,1) ~= "/" then
10 path = "/"..path; 10 path = "/"..path;