aboutsummaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-15 21:22:45 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-15 21:22:45 +0100
commitc30a7e8545d1354afe6c25018c7b74d6e09604da (patch)
tree02949c230f40ca6734b9263cca7e2d1caae3bdee /net/http
parent6c0fbb813fe6fc10fefeb076221e756521bd033e (diff)
parent91b727be710169b424cae0cd9f7d782230599b2b (diff)
downloadprosody-c30a7e8545d1354afe6c25018c7b74d6e09604da.tar.gz
prosody-c30a7e8545d1354afe6c25018c7b74d6e09604da.zip
Merge 0.9->trunk
Diffstat (limited to 'net/http')
-rw-r--r--net/http/parser.lua3
1 files changed, 2 insertions, 1 deletions
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