Commit Graph

129 Commits

Author SHA1 Message Date
Nia Watts 86e98b3ad8 Fix typo in 'Query' documentation: 'mplementation' -> 'implementation'. 2020-05-30 14:01:32 -07:00
Sergio Benitez 6cb0521ac9 Add 'handler::Outcome::from_or_forward()'. 2020-05-30 00:59:21 -07:00
Sergio Benitez 7739c0e977 Update 'base64' to '0.12'. 2020-05-29 01:53:06 -07:00
Sergio Benitez 89150f9b81 Fix 'LocalRequest::clone()' soundness issue.
The existing implementation of 'LocalRequest::clone()' mistakenly copied
the internal 'Request' pointer from the existing 'LocalRequest' to the
cloned 'LocalRequest'. This resulted in an aliased '*mut Request'
pointer, a clear soundness issue. The fix in this commit is to clone the
internal 'Request', replacing the internal pointer with the newly cloned
'Request' when producing the cloned 'LocalRequest'. A fix that removes
all 'unsafe' code should be explored.

Fixes #1312.
2020-05-29 01:53:06 -07:00
Sergio Benitez 376f741338 Properly delimit length and name in flash cookies.
Fixes #1263.
2020-05-29 01:53:06 -07:00
Thiago Veronezi 3d31dad760 Fix typo in 'State' documentation: missing backtick. 2020-05-29 01:53:06 -07:00
Sorin Davidoi d265ca70bf Improve accessibility of default error HTML. 2020-05-29 01:53:06 -07:00
Sergio Benitez 807e3b8d85 New version: 0.4.4. 2020-03-09 02:17:21 -07:00
Sergio Benitez 635a4bddba Fix more broken links. 2020-03-09 02:04:03 -07:00
Sergio Benitez cba00ec66a Fix an array of broken doc links. 2020-03-09 01:12:43 -07:00
Sergio Benitez b3d65b0ad2 New version: 0.4.3. 2020-02-29 18:19:02 -08:00
Sergio Benitez 90eaad852c Deprecate 'Result' specialization. Add 'Debug' responder. 2020-02-29 17:47:57 -08:00
Sergio Benitez 436a5aad57 Deprecate 'Result<T, E>, E: !Responder' responder. 2020-02-29 17:47:45 -08:00
Sergio Benitez ff535c2ff9 Inline macro docs into core crate. 2020-02-27 18:42:28 -08:00
Dmitry Murzin 40f267c580 Implement 'FromParam' for 'NonZero*' types. 2020-02-27 18:20:01 -08:00
A. L 25c2f62850 Add additional Responder wrappers for some common HTTP status codes:
* 204 NoContent
* 401 Unauthorized
* 403 Forbidden
* 409 Conflict
2020-02-27 16:14:27 -08:00
Jacob Pratt a1cca97587 Abide by formatting in 'Debug' implementations. 2020-02-27 16:04:36 -08:00
Sergio Benitez 60cba26f65 Fix guide examples for 0.4. 2020-02-27 15:35:56 -08:00
Sergio Benitez 4618bd0a5e Test all guide code examples.
Every code example is now fully runnable and testable. As a result, all
examples are now tested and include imports. Relevant imports are shown
by default. Code examples can be expanded to show all imports.

Fixes #432.
2020-02-27 14:43:06 -08:00
Sergio Benitez 0c56ecc181 Set cookies even on error responses.
Fixes #1213.
2020-02-09 01:53:05 -08:00
Sergio Benitez 35753c4d53 Fix tests for Windows. 2019-07-06 01:15:47 -07:00
Sergio Benitez 2d4dc5ae58 New version: 0.4.2. 2019-06-28 17:50:57 -07:00
Thomas Lent b00423d7ac Fix type in 'Data' rustdocs: 'T' -> 'DataGuard'. 2019-06-28 12:20:39 -07:00
Sergio Benitez 2d4eec8f7e Update 'version_check' to 0.9. 2019-06-28 12:17:28 -07:00
jeb 8e7100f8f7 Reexport derive macros alongside derived traits. 2019-06-28 12:11:18 -07:00
Jacob Pratt 3e3fe56e6a Remove stabilized feature gates.
* try_from
* transpose_result
2019-06-28 12:08:49 -07:00
Sergio Benitez dd06d7ba80 Clean up 'AdHoc' fairing implementation. 2019-06-28 12:08:49 -07:00
Konrad Borowski 8574dbf841 Replace uses of `FnBox`; `Box<dyn FnOnce>` now implements `FnOnce`. 2019-06-28 12:06:10 -07:00
Sergio Benitez f1f09f17ca New version: 0.4.1. 2019-05-11 16:51:38 -07:00
Richard Petrie 2cb35e2544 Replace deprecated 'isatty' with 'atty'. 2019-05-10 19:50:58 -07:00
Sergio Benitez 82da917055 Clarify defaults in 'Config' documentation. 2019-05-10 19:50:58 -07:00
Sergio Benitez 9dce86744c Clean up 'Server' header commentary. 2019-05-09 09:11:51 -07:00
Sergio Benitez cb359fe38b Clean up 'conditionally-set-server-header' test. 2019-05-09 09:11:51 -07:00
lu4nm3 0a068b0dd6 Set default 'Server' header only if it isn't set.
Closes #996.
2019-05-09 09:11:51 -07:00
Sergio Benitez de9a98edd2 Update 'Rocket::custom()' docs to match signature.
Resolves #910.
2019-02-06 17:18:53 -08:00
Chris Foster 4921af459f Fix typo in 'LenientForm' docstring: 'gaurd' -> 'guard'. 2019-01-31 20:15:10 -08:00
Sergio Benitez ca5623c641 Type encoding to fix encoding issues once and for all.
Fixes #849.
2018-12-12 17:38:36 -08:00
Sergio Benitez a4dcb0cf4c New version: 0.4.0. 2018-12-06 09:19:11 -08:00
Sergio Benitez 90a6749313 New version: 0.4.0-rc.2. 2018-11-30 21:00:18 -08:00
Sergio Benitez 7919ceac39 Strip dev-dependencies more reliably. 2018-11-30 20:58:29 -08:00
Sergio Benitez 5ec21d5ba0 Update dependencies to published versions. 2018-11-30 09:00:16 -08:00
Sergio Benitez b7db74144f Parameterize 'UriDisplay' with 'Path' or 'Query'.
This commit introduces the sealed `UriPart` marker trait as well as the
implementing `Path` and `Query` marker types, allowing for parts of a
URI to be distinguished at the type level. Consequently, `UriDisplay`
has been parameterized with `P: UriPart`, creating `UriDisplay<Path>`
and `UriDisplay<Query>`. The effect of this change is improved type
safely for URI rendering as well as the ability to omit rendering values
in query parts via `Option` and `Result`.

The `UriDisplay` derive was replaced by `UriDisplayQuery` and
`UriDisplayPath` which derive implementations for `UriDisplay<Path>`
and `UriDisplay<Query>`, respectively.

This commit also works around a rustdoc visibility issue by creating a
hidden `http::private` module.

Finally, this commit also removes the now vestigial use of the
`rustc_private` feature in codegen.

Fixes #827.
2018-11-27 10:01:47 -06:00
Sergio Benitez abb434f228 Stop using white for legible logging everywhere.
Prior to this change, Rocket emitted "white" text in much of its logging
output. On terminals with light backgrounds, the text was nearly
illegible. This PR stops using white coloring altogether, opting instead
to use the terminal's default color albeit with bold styling. On dark
terminals, this will likely be a light color, and on light terminals,
this will likely be a dark color. The end result is that Rocket's
logging output should be readable everywhere.

Resolves #639.
2018-11-19 02:11:38 -08:00
Sergio Benitez 76c830a467 Update 'base64', 'crossbeam', 'rand' dependencies. 2018-11-18 03:47:12 -08:00
Sergio Benitez 3b6c4d2a5f Prefix codegen imports to avoid name collisions.
Fixes #817.
2018-11-12 13:08:39 -08:00
Sergio Benitez 834c91ae9d Remove the need for a current working directory.
This commit includes several breaking changes:

  * `Config{new,development,staging,production}` constructors return a
    `Config` instead of a `Result<Config>`.
  * `Config.root()` returns an `Option<&Path>` instead of `&Path`.
  * `ConfigError::BadCWD` was removed.
  * `Config` no longer exposes a `config_path` field.

Resolves #809.
2018-11-12 02:24:13 -08:00
Alva Snædís b87994b52c Implement FromParam, FromFormValue for i128, u128. 2018-11-11 21:51:24 -08:00
Sergio Benitez 4224419e63 Reduce 'cfg' usage for 'private-cookies' feature. 2018-11-08 23:56:15 -08:00
Linus Unnebäck 53758c6dd7 Introduce the 'private-cookies' feature. 2018-11-08 23:38:18 -08:00
Sergio Benitez b16269a30e Add note about cookie tracking serialization. 2018-11-08 21:40:42 -08:00