diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 11 | ||||
-rw-r--r-- | libs/http/luasrc/http/protocol.lua | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index b9383a3ec..6aec2fbbb 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -356,10 +356,9 @@ function NamedSection.parse(self) return end else -- Create and apply default values - if luci.http.formvalue("cbi.cns."..path) and self:create(s) then - for k,v in pairs(self.children) do - v:write(s, v.default) - end + if luci.http.formvalue("cbi.cns."..path) then + self:create(s) + return end end end @@ -643,10 +642,6 @@ function DummyValue.parse(self) end -function DummyValue.render(self, s) - luci.template.render(self.template, {self=self, section=s}) -end - --[[ Flag - A flag being enabled or disabled diff --git a/libs/http/luasrc/http/protocol.lua b/libs/http/luasrc/http/protocol.lua index ccf40bd2e..542c3147e 100644 --- a/libs/http/luasrc/http/protocol.lua +++ b/libs/http/luasrc/http/protocol.lua @@ -661,7 +661,7 @@ function urldecode_message_body( source, msg ) -- Create a throttling LTN12 source -- See explaination in mimedecode_message_body(). local tsrc = function() - if msg._urldecbuffer ~= nil and #msg._urldecbuffer > TSRC_BLOCKSIZE then + if msg._urldecbuffer ~= nil and #msg._urldecbuffer > 0 then return "" else return source() |