From 001f4a7c752571c3f4536b5e7a53a7e4c1451293 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 15 Apr 2013 19:37:15 +0200 Subject: mod_s2s: Add missing space --- plugins/mod_s2s/mod_s2s.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index eb10cd35..6764e857 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -642,7 +642,7 @@ function check_auth_policy(event) if must_secure and not session.cert_identity_status then module:log("warn", "Forbidding insecure connection to/from %s", host); if session.direction == "incoming" then - session:close({ condition = "not-authorized", text = "Your server's certificate is invalid, expired, or not trusted by"..session.to_host }); + session:close({ condition = "not-authorized", text = "Your server's certificate is invalid, expired, or not trusted by "..session.to_host }); else -- Close outgoing connections without warning session:close(false); end -- cgit v1.2.3 From 91b727be710169b424cae0cd9f7d782230599b2b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 15 Apr 2013 21:21:57 +0100 Subject: net.http.parser: Fix off-by-one error in chunked encoding parser --- net/http/parser.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/http/parser.lua b/net/http/parser.lua index 34742d2b..9688e052 100644 --- a/net/http/parser.lua +++ b/net/http/parser.lua @@ -133,7 +133,8 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb) buf = buf:gsub("^.-\r\n\r\n", ""); -- This ensure extensions and trailers are stripped success_cb(packet); elseif #buf - chunk_start + 2 >= chunk_size then -- we have a chunk - packet.body = packet.body..buf:sub(chunk_start, chunk_start + chunk_size); + print(chunk_start, chunk_size, ("%q"):format(buf)) + packet.body = packet.body..buf:sub(chunk_start, chunk_start + (chunk_size-1)); buf = buf:sub(chunk_start + chunk_size + 2); chunk_size, chunk_start = nil, nil; else -- Partial chunk remaining -- cgit v1.2.3