Merge pull request #256 from chris5560/master
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 24 Nov 2014 10:37:24 +0000 (11:37 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 24 Nov 2014 10:37:24 +0000 (11:37 +0100)
luci-app-ddns: modified to support ddns-scripts 2.1.0-2

modules/base/luasrc/http/protocol.lua
modules/base/luasrc/ltn12.lua

index 0d41550..6431b04 100644 (file)
@@ -658,7 +658,7 @@ function parse_message_body( src, msg, filecb )
 
                        if not ok and err then
                                return nil, err
-                       elseif not err then
+                       elseif not ok then -- eof
                                return true
                        end
                end
index 9371290..b59fb8c 100644 (file)
@@ -144,6 +144,7 @@ function source.file(handle, io_err)
     if handle then
         return function()
             local chunk = handle:read(BLOCKSIZE)
+            if chunk and chunk:len() == 0 then chunk = nil end
             if not chunk then handle:close() end
             return chunk
         end