- Typo in
Outcomeformatting fixed (Succcess -> Success). - Added
ContentType::CSV. - Dynamic segments parameters are properly resolved, even when mounted.
- Request methods are only overridden via
_methodfield on POST. - Form value
Strings are properly decoded.
- The
_methodfield is now properly ignored inFromFormderivation. - Unknown Content-Types in
formatno longer result in an error. - Deriving
FromFormno longer results in a deprecation warning. - Codegen will refuse to build with incompatible rustc, presenting error message and suggestion.
- Added
headas a valid decorator forHEADrequests. - Added
route(OPTIONS)is a valid decorator forOPTIONSrequests.
- Files with the
.teraextension are properly autoescaped. - Nested template names are properly resolved on Windows.
- Template implements
Display. - Tera dependency updated to version 0.6.
- Todo example requirements clarified in its
README.
- Tests added for
config,optional_result,optional_redirect, andquery_paramsexamples. - Testing script checks for and disallows tab characters.
- New script (
bump_version.sh) automates version bumps. - Config script emits error when readlink/readpath support is bad.
- Travis badge points to public builds.
- Fix
get_raw_segmentsindex argument in route codegen (#41). - Segments params (
<param..>) respect prefixes.
- Fix nested template name resolution (#42).
- New script (
publish.sh) automates publishing to crates.io. - New script (
bump_version.sh) automates version bumps.
NamedFileResponderlost its body in the shuffle; it's back!
This is the first public release of Rocket!
All of the mentions to hyper types in core Rocket types are no more. Rocket
now implements its own Request and Response types.
ContentTypeuses associated constants instead of static methods.StatusCoderemoved in favor of newStatustype.Responsetype alias superceded byResponsetype.Responder::respondno longer takes in hyper type.Responder::respondreturnsResponse, takesselfby move.HandlerreturnsOutcomeinstead ofResponsetype alias.ErrorHandlerreturnsResult.- All
Hyper*types were moved to unprefixed versions inhyper::. MockRequest::dispatchnow returns aResponsetype.URIBufremoved in favor of unifiedURI.- Rocket panics when an illegal, dynamic mount point is used.
- Rocket handles
HEADrequests automatically. - New
ResponseandResponseBuildertypes. - New
Request,Header,Status, andContentTypetypes.
MockRequestallows any type of header.MockRequestallows cookies.
- Debug output disabled by default.
- The
ROCKET_CODEGEN_DEBUGenvironment variables enables codegen logging.
All incoming request data is now streamed. This resulted in a major change to the Rocket APIs. They are summarized through the following API changes:
- The
formroute parameter has been removed. - The
dataroute parameter has been introduced. - Forms are now handled via the
dataparameter andFormtype. - Removed the
dataparameter fromRequest. - Added
FromDataconversion trait and default implementation. FromDatais used to automatically derive thedataparameter.Responders are now final: they cannot forward to other requests.Responsers may only forward to catchers.
- Request
uriparameter is private. Useuri()method instead. formmodule moved underrequestmodule.response::datawas renamed toresponse::content.- Introduced
OutcomewithSuccess,Failure, andForwardvariants. outcomemodule moved to top-level.Responseis now a type alias toOutcome.EmptyResponderwas removed.StatusResponderremoved in favor ofresponse::statusmodule.
- Error handlers can now take 0, 1, or 2 parameters.
FromFormderive now works on empty structs.- Lifetimes are now properly stripped in code generation.
- Any valid ident is now allowed in single-parameter route parameters.
- Route is now cloneable.
Requestno longer has any lifetime parameters.Handlertype now includes aDataparameter.httpmodule is public.Responderimplemented for()type as an empty response.- Add
config::get()for global config access. - Introduced
testingmodule. Rocket.tomlallows global configuration via[global]table.
- Added a
raw_uploadexample. - Added a
pastebinexample. - Documented all public APIs.
- Now building and running tests with
--all-featuresflag. - Added appveyor config for Windows CI testing.
- Remove
Rocket::newin favor ofignitemethod. - Remove
Rocket::mount_and_launchin favor of chainingmount(..).launch(). mountandcatchtakeRockettype by value.- All types related to HTTP have been moved into
httpmodule. Template::renderincontribnow takes context by reference.
- Rocket now parses option
Rocket.tomlfor configuration, defaulting to sane values. ROCKET_ENVenvironment variable can be used to specify running environment.
- Document
ContentType. - Document
Request. - Add script that builds docs.
- Scripts can now be run from any directory.
- Cache Cargo directories in Travis for faster testing.
- Check that library version numbers match in testing script.
- Rename
response::data_typetoresponse::data.
- Rocket interprets
_methodfield in forms as the incoming request's method. - Add
Outcome::Badto signify responses that failed internally. - Add a
NamedFileRespondertype that uses a file's extension for the response's content type. - Add a
StreamResponderfor streaming responses.
- Introduce the
contribcrate. - Add JSON support via
JSON, which implementsFromRequestandResponder. - Add templating support via
Templatewhich implementsResponder.
- Initial guide-like documentation.
- Add documentation, testing, and contributing sections to README.
- Add a significant number of codegen tests.