mirror of
https://github.com/aykhans/sarin.git
synced 2026-10-17 14:53:52 +00:00
refactor(script): drop the per-call maxBodySize and its client cache
This commit is contained in:
10 files changed
+54
-146
No files matched your search
@@ -106,15 +106,6 @@ func (e *LuaEngine) parseHTTPOptions(opts *lua.LTable, req *HTTPRequest) error {
|
||||
return
|
||||
}
|
||||
req.MaxRedirects, err = parseHTTPMaxRedirects(float64(count))
|
||||
case httpOptionMaxBodySize:
|
||||
switch size := v.(type) {
|
||||
case lua.LNumber:
|
||||
req.MaxBodySize, err = parseHTTPMaxBodySize(float64(size))
|
||||
case lua.LString:
|
||||
req.MaxBodySize, err = parseHTTPMaxBodySizeString(string(size))
|
||||
default:
|
||||
err = types.NewScriptHTTPOptionError(name, types.NewScriptTypeError("number or size string", v.Type().String()))
|
||||
}
|
||||
default:
|
||||
err = types.NewScriptHTTPOptionError(name, types.ErrScriptHTTPUnknownOption)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user