module("luci.http.protocol", package.seeall)
-require("ltn12")
-require("luci.http.protocol.filter")
+local ltn12 = require("luci.ltn12")
HTTP_MAX_CONTENT = 1024*4 -- 4 kB maximum content size
HTTP_URLENC_MAXKEYLEN = 1024 -- maximum allowd size of urlencoded parameter names
end
if type(str) == "string" then
- str = str:gsub( "+", " " ):gsub( "%%([a-fA-F0-9][a-fA-F0-9])", __chrdec )
+ str = str:gsub( "+", " " )
+ str = str:gsub( "%%([a-fA-F0-9][a-fA-F0-9])", __chrdec )
end
return str
if type(str) == "string" then
str = str:gsub(
- "([^a-zA-Z0-9$_%-%.+!*'(),])",
+ "([^a-zA-Z0-9$_%-%.%+!*'(),])",
__chrenc
)
end
if chunk == nil then
if err ~= "timeout" then
return nil, part
- and "Line exceeds maximum allowed length["..part.."]"
+ and "Line exceeds maximum allowed length"
or "Unexpected EOF"
else
return nil, err