class
Amber::Router::Parsers::FormScanner
- Amber::Router::Parsers::FormScanner
- Reference
- Object
Overview
Splits a URL-encoded stream into decoded key and value pairs, the way
URI::Params.parse does (& and ; separate pairs, + is a space),
while enforcing the byte limits of Amber::Configuration::ParamsConfig
as the bytes arrive.
The stream is read in blocks no larger than the remaining body
allowance, and a raw key or value is rejected once it is longer than
three times its decoded limit (percent-encoding uses at most three bytes
per decoded byte). Nothing is decoded until its raw form is within
bounds; ParamBudget#admit! then checks the exact decoded lengths.