From 3e7bffe8c8c5c1ee0022dca4d1a5bb7b16d78b1b Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 2 Apr 2017 00:24:07 +0200 Subject: net.http: Pass error all the way to callback --- net/http/parser.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/http') diff --git a/net/http/parser.lua b/net/http/parser.lua index 96d32ec8..4e4ae9fb 100644 --- a/net/http/parser.lua +++ b/net/http/parser.lua @@ -46,7 +46,7 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb) packet.body = buf; success_cb(packet); elseif buf ~= "" then -- unexpected EOF - error = true; return error_cb(); + error = true; return error_cb("unexpected-eof"); end return; end -- cgit v1.2.3