mirror of
https://github.com/rwf2/Rocket.git
synced 2024-12-31 23:02:37 +00:00
ed429cd487
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.
44 lines
1008 B
TOML
44 lines
1008 B
TOML
[package]
|
|
name = "rocket"
|
|
version = "0.1.6"
|
|
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
|
description = """
|
|
Web framework for nightly with a focus on ease-of-use, expressability, and
|
|
speed.
|
|
"""
|
|
documentation = "https://api.rocket.rs/rocket/"
|
|
homepage = "https://rocket.rs"
|
|
repository = "https://github.com/SergioBenitez/Rocket"
|
|
readme = "../README.md"
|
|
keywords = ["rocket", "web", "framework", "server"]
|
|
license = "MIT/Apache-2.0"
|
|
build = "build.rs"
|
|
categories = ["web-programming::http-server"]
|
|
|
|
[dependencies]
|
|
term-painter = "^0.2"
|
|
log = "^0.3"
|
|
url = "^1"
|
|
hyper = { version = "0.10.4", default-features = false }
|
|
toml = { version = "^0.2", default-features = false }
|
|
num_cpus = "1"
|
|
state = "^0.2"
|
|
time = "^0.1"
|
|
memchr = "1"
|
|
|
|
[dependencies.cookie]
|
|
version = "^0.6"
|
|
default-features = false
|
|
features = ["percent-encode"]
|
|
|
|
[dev-dependencies]
|
|
lazy_static = "0.2"
|
|
rocket_codegen = { version = "0.1.6", path = "../codegen" }
|
|
|
|
[build-dependencies]
|
|
ansi_term = "^0.9"
|
|
version_check = "^0.1"
|
|
|
|
[features]
|
|
testing = []
|