# HG changeset patch # User Matthew Wild # Date 1366057365 -3600 # Node ID dc9485ac266bae895bcf875a9ddc4dc8dd434550 # Parent 3db05041c278319699ad9c6da95e6f7c4cf0738b# Parent c2c9f07c5d6aff255b9cac6b1cf5e691d2418dd2 Merge 0.9->trunk diff -r 3db05041c278 -r dc9485ac266b net/http/parser.lua --- a/net/http/parser.lua Mon Apr 15 16:43:08 2013 +0100 +++ b/net/http/parser.lua Mon Apr 15 21:22:45 2013 +0100 @@ -133,7 +133,8 @@ 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 diff -r 3db05041c278 -r dc9485ac266b plugins/mod_s2s/mod_s2s.lua --- a/plugins/mod_s2s/mod_s2s.lua Mon Apr 15 16:43:08 2013 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Mon Apr 15 21:22:45 2013 +0100 @@ -642,7 +642,7 @@ 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