Changeset

6388:264c7c45c381

Merge 0.10->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Sep 2014 18:51:29 +0100
parents 6385:d87195d53d84 (current diff) 6387:6d769afd0bc5 (diff)
children 6390:6bd67fba6139
files
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/http/parser.lua	Wed Sep 03 03:35:48 2014 +0200
+++ b/net/http/parser.lua	Wed Sep 03 18:51:29 2014 +0100
@@ -140,7 +140,11 @@
 								break;
 							end
 						elseif len and #buf >= len then
-							packet.body, buf = buf:sub(1, len), buf:sub(len + 1);
+                                                       if packet.code == 101 then
+                                                               packet.body, buf = buf, ""
+                                                       else
+                                                               packet.body, buf = buf:sub(1, len), buf:sub(len + 1);
+                                                       end
 							state = nil; success_cb(packet);
 						else
 							break;