X-Git-Url: http://git.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fweb%2Fluasrc%2Fhttp%2Fprotocol.lua;h=6901291b9ad69b5feefe4a91a6cee2a37d13e0eb;hp=970983d5b5e251593b85989c7d14c0a5abc71a48;hb=dfe85d7e518cc35a55e372b0ac31345788a486a8;hpb=77da39e7762f7494399e7bad88709764cd6d8f44 diff --git a/libs/web/luasrc/http/protocol.lua b/libs/web/luasrc/http/protocol.lua index 970983d5b5..6901291b9a 100644 --- a/libs/web/luasrc/http/protocol.lua +++ b/libs/web/luasrc/http/protocol.lua @@ -517,7 +517,7 @@ function _linereader( obj, bufsz ) __read = function() return obj:sub( _pos, _pos + bufsz - #_buf - 1 ) end -- object implements a receive() or read() function - elseif type(obj) == "userdata" and ( type(obj.receive) == "function" or type(obj.read) == "function" ) then + elseif (type(obj) == "userdata" or type(obj) == "table") and ( type(obj.receive) == "function" or type(obj.read) == "function" ) then if type(obj.read) == "function" then __read = function() return obj:read( bufsz - #_buf ) end