最近openwrt界面编辑文本时,发现太长的文件无法编辑,界面下方出现:一个或多个必选项值为空!之类的提示。
以前的版本没有此问题,猜测是哪个地方的配置做了修改,经过搜索,发现是http.lua 里的配置有关。找到此文件,搜索 MAX_CONTENT 会发现被限制到100KB,大小走出100KB的文件无法在界面编辑,直接把100修改为500,再进行编辑后成功,不再有相应的提醒。
在luci/modules/luci-base/luasrc/http.lua
有关于body的限制
local table, ipairs, pairs, type, tostring, tonumber, error =
table, ipairs, pairs, type, tostring, tonumber, error
module "luci.http"
HTTP_MAX_CONTENT = 1024*100 -- 100 kB maximum content size
context = util.threadlocal()
感谢大佬