Software /
code /
prosody
Comparison
plugins/mod_http.lua @ 7581:01d0d466d7be
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Aug 2016 15:16:02 +0200 |
parent | 6602:61b6a4fc65f1 |
parent | 7580:588ed6451984 |
child | 7605:2481ebc7f715 |
child | 7867:194f540e13e2 |
comparison
equal
deleted
inserted
replaced
7572:f549587b8c06 | 7581:01d0d466d7be |
---|---|
15 local url_build = require "socket.url".build; | 15 local url_build = require "socket.url".build; |
16 | 16 |
17 local server = require "net.http.server"; | 17 local server = require "net.http.server"; |
18 | 18 |
19 server.set_default_host(module:get_option_string("http_default_host")); | 19 server.set_default_host(module:get_option_string("http_default_host")); |
20 | |
21 server.set_option("body_size_limit", module:get_option_number("http_max_content_size")); | |
22 server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size")); | |
20 | 23 |
21 local function normalize_path(path) | 24 local function normalize_path(path) |
22 if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end | 25 if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end |
23 if path:sub(1,1) ~= "/" then path = "/"..path; end | 26 if path:sub(1,1) ~= "/" then path = "/"..path; end |
24 return path; | 27 return path; |