Software /
code /
prosody
Comparison
net/http.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 | 12881:91baddaeea84 |
comparison
equal
deleted
inserted
replaced
12973:cc215923297f | 12974:ba409c67353b |
---|---|
4 -- | 4 -- |
5 -- This project is MIT/X11 licensed. Please see the | 5 -- This project is MIT/X11 licensed. Please see the |
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 local b64 = require "util.encodings".base64.encode; | 9 local b64 = require "prosody.util.encodings".base64.encode; |
10 local url = require "socket.url" | 10 local url = require "socket.url" |
11 local httpstream_new = require "net.http.parser".new; | 11 local httpstream_new = require "prosody.net.http.parser".new; |
12 local util_http = require "util.http"; | 12 local util_http = require "prosody.util.http"; |
13 local events = require "util.events"; | 13 local events = require "prosody.util.events"; |
14 local verify_identity = require"util.x509".verify_identity; | 14 local verify_identity = require"prosody.util.x509".verify_identity; |
15 local promise = require "util.promise"; | 15 local promise = require "prosody.util.promise"; |
16 local http_errors = require "net.http.errors"; | 16 local http_errors = require "prosody.net.http.errors"; |
17 | 17 |
18 local basic_resolver = require "net.resolvers.basic"; | 18 local basic_resolver = require "prosody.net.resolvers.basic"; |
19 local connect = require "net.connect".connect; | 19 local connect = require "prosody.net.connect".connect; |
20 | 20 |
21 local ssl_available = pcall(require, "ssl"); | 21 local ssl_available = pcall(require, "ssl"); |
22 | 22 |
23 local t_insert, t_concat = table.insert, table.concat; | 23 local t_insert, t_concat = table.insert, table.concat; |
24 local pairs = pairs; | 24 local pairs = pairs; |
25 local tonumber, tostring, traceback = | 25 local tonumber, tostring, traceback = |
26 tonumber, tostring, debug.traceback; | 26 tonumber, tostring, debug.traceback; |
27 local os_time = os.time; | 27 local os_time = os.time; |
28 local xpcall = require "util.xpcall".xpcall; | 28 local xpcall = require "prosody.util.xpcall".xpcall; |
29 local error = error | 29 local error = error |
30 | 30 |
31 local log = require "util.logger".init("http"); | 31 local log = require "prosody.util.logger".init("http"); |
32 | 32 |
33 local _ENV = nil; | 33 local _ENV = nil; |
34 -- luacheck: std none | 34 -- luacheck: std none |
35 | 35 |
36 local requests = {}; -- Open requests | 36 local requests = {}; -- Open requests |