Rocket/codegen
Sergio Benitez ed429cd487 Change FromForm signature. Emit 422 form errors on bad form strings.
This commit changes the way Rocket parses form items. In particular, it now
(liberally) validates form strings, returning a Bad Request on malformed inputs
and Unprocessable Entity on bad parses.

The 'FormItems' iterator was modified to accomodate this. The iterator is now
initialized using 'from': 'FormItems::from(form_string)'. The iterator can be
queried to check for a complete parse using either 'completed()' or
'exhausted()', the latter of which will consume valid keys/values and return
true only if the entire string was consumed.

The 'FromForm' trait now takes a mutable borrow to a 'FormItems' iterator.

The 'Form' and 'FormForm' implementation for 'Form' were modified to use the new
iterfaces and check for 'exhausted' after a parse, returning a Bad Request error
if the iterator cannot be exhausted.

Resolves #46.
2017-02-01 18:22:51 -08:00
..
src Change FromForm signature. Emit 422 form errors on bad form strings. 2017-02-01 18:22:51 -08:00
tests Change FromForm signature. Emit 422 form errors on bad form strings. 2017-02-01 18:22:51 -08:00
build.rs Refuse to build on non-nightly with a nice message. 2017-01-15 01:16:47 -08:00
Cargo.toml New version: 0.1.6. 2017-01-26 11:26:50 -08:00