Sergio Benitez
0af25bfb6d
Move derive attribute after derive.
2021-02-09 17:17:26 -08:00
Sergio Benitez
e325e2fce4
Fix soundness issue: make 'Formatter' panic-safe.
...
Fixes #1534 .
2021-02-09 16:58:34 -08:00
Sergio Benitez
c24f15c18f
Add regression test for #1503 .
...
Closes #1503 .
2021-01-14 15:15:57 -08:00
Sergio Benitez
407e346a6a
Clean up 'on_launch_fairing_can_inspect_port' test.
2021-01-13 17:20:44 -08:00
Filip Gospodinov
48fd83a31d
Run launch fairings after effective port is known.
2021-01-13 17:20:33 -08:00
Sergio Benitez
43ade920c5
Warn when deprecated profiles are set.
2021-01-13 16:21:36 -08:00
Sergio Benitez
28976a5bd3
Preserve 'secret_key' in 'Config' provider data.
...
Also fixes emission of 'secret_key' warnings when 'secrets' feature is
disabled.
Resolves #1505 .
Fixes #1510 .
2021-01-13 16:01:39 -08:00
Jeb Rosen
92af8fca72
Update to 'tokio' 1.0, 'hyper' 0.14.
2021-01-13 15:22:16 -08:00
Sergio Benitez
031948c1da
Remove superfluous semicolons.
2021-01-13 14:30:08 -08:00
Jeb Rosen
a0d4a4749a
Update 'memcache' dependency to 0.15.
2021-01-13 14:20:43 -08:00
Brendon Federko
cb33429ce4
Enable 'std' 'indexmap' feature.
2021-01-12 14:52:37 -08:00
Brendon Federko
e68a951a54
Upodate tests for latest stable.
2021-01-12 14:52:34 -08:00
Sergio Benitez
9671115796
Use 'workers' value from 'Config::figment()'.
...
This commit also improves config pretty-printing and warning messages.
It also fixes an issue that resulted in config value deprecation
warnings not being emitted. The 'workers' value is now a 'usize', not a
'u16'; contrib pool sizes now default to 'workers * 2'.
Closes #1470 .
2020-12-24 15:58:48 -08:00
Jeb Rosen
1f1f44f336
Update UI tests for latest stable.
2020-11-21 12:42:57 -08:00
Jeb Rosen
bcb8b3334b
Update CI to use GitHub 'environment files'.
2020-11-18 12:38:24 -08:00
Sergio Benitez
fa77435187
Bust cache on 'Request::{add,replace}_header()'.
...
Also changes 'Header::name()' to return '&UncasedStr'.
Resolves #518 .
2020-11-05 21:03:58 -08:00
Jeb Rosen
c6298b9e11
Use 'spawn_blocking' to drop sync database pools.
...
This was already done for the connections, but pools might also do
synchronous/blocking work on Drop.
Fixes #1466 .
2020-11-05 00:06:41 -08:00
Jeb Rosen
2f98299272
Allow fallible callback in 'Template::try_custom()'.
...
Closes #1064 .
2020-11-04 02:40:53 -08:00
Sergio Benitez
007c4b093f
Use '#[rocket::main]', not '#[main]'.
2020-11-03 14:20:29 -08:00
Sergio Benitez
bb295ae21b
Update console output in guide.
2020-11-03 12:56:20 -08:00
Sergio Benitez
86a6b4b12f
Improve async, mount sections of overview guide.
...
Resolves #1458 .
Closes #1464 .
2020-11-03 12:52:31 -08:00
Sergio Benitez
86ff66a69c
Streamline raw identifier support in codegen.
2020-11-03 12:07:23 -08:00
Jeb Rosen
97f6bc5dc0
Support raw identifiers in forms, routes, uri.
...
Resolves #881 .
2020-11-03 01:42:37 -08:00
Sergio Benitez
b5e4dded8a
Accept browser-sent unencoded query characters.
...
Closes #941 .
Co-authored-by: Vladimir Ignatev <ya.na.pochte@gmail.com>
2020-11-02 15:08:33 -08:00
Sergio Benitez
949bb01e2d
Generate path encoding set using 'const fn'.
...
Co-authored-by: Jakub Wieczorek <jakub.adam.wieczorek@gmail.com>
2020-11-01 21:26:31 -08:00
Sergio Benitez
337e8843a4
Use 'Option', 'Result' directly in 'uri!' query.
...
Prior to this commit, the conversion 'T -> Option<T>' was applied in
both the path and query parts of a URI in the 'uri' macro via the
'FromUriParam' trait with no implementation for 'Option<T>' directly.
This meant that it was impossible to directly render an 'Option<T>'.
This was exactly desired for the path part, where rendering a 'None'
would yield an incorrect URI, but the restriction was too strict for the
query part, where a 'None' is entirely valid. This commit makes changes
the conversion so that it only applied to path parts and adds the
identity conversions for 'Option<T>' and 'Result<T, E>' for query parts.
The side effect is a breaking change: due to conflicting impls, the 'T'
to 'Option<T>' conversion was removed for query parts. Thus, all 'uri!'
query route arguments of type 'Option' or 'Result' must now be wrapped
in 'Some' or 'Ok'. Due to new 'Option<T> <-> Result<T, E>' conversions,
either 'Some' _and_ 'Ok' work in both contexts.
Closes #1420 .
2020-11-01 10:30:30 -08:00
Sergio Benitez
edc91f65b7
Mimic Rocket's config in custom providers example.
2020-10-30 03:08:26 -07:00
Compro Prasad
de1cffba46
Remove unnecessary 'RawStr.as_str()' in guide.
...
Closes #1454 .
2020-10-30 02:49:00 -07:00
Sergio Benitez
55b651bd70
Use 'rocket::custom()' for 'State' tests.
2020-10-30 02:49:00 -07:00
Jonty
b7565172eb
Impl 'Clone' for 'State'.
...
Resolves #1411 .
2020-10-30 02:16:24 -07:00
Sergio Benitez
a6f5a63535
Add tests for ignored parameters '<_>'.
...
Co-authored-by: timokoesters <timo@koesters.xyz>
2020-10-30 00:47:41 -07:00
Sergio Benitez
8e8fb4cae8
Allow ignored route path segments.
...
Co-authored-by: timokoesters <timo@koesters.xyz>
2020-10-30 00:06:39 -07:00
Sergio Benitez
23738446f0
Impl 'std::error::Error' for 'Error'.
...
Resolves #1460 .
2020-10-27 16:04:25 -07:00
Sergio Benitez
8570afff3e
Use threaded scheduler in tests.
...
This prevents async I/O timeouts in attach fairings.
Co-authored-by: Jeb Rosen <jeb@jebrosen.com>
2020-10-26 13:29:36 -07:00
Sergio Benitez
0c150c2a0e
Remove unused 'config' examples tests.
2020-10-22 18:13:19 -07:00
Sergio Benitez
09f0087034
Split server parts of 'Rocket' into 'server.rs'.
2020-10-22 18:00:07 -07:00
Sergio Benitez
198b6f0e97
Fix various broken rustdoc links.
2020-10-22 03:53:07 -07:00
Sergio Benitez
08510302da
Add 'Rocket::catchers()', rearrange other getters.
2020-10-22 03:41:02 -07:00
Sergio Benitez
ec9b5816a8
Remove 'rocket::inspect()', 'Cargo'.
...
This commit reverts most of dea940c7
and d89c7024
. The "fix" is to run
attach fairings on a new thread. If a runtime is already running, it is
used. Otherwise, the future is executed in a single-threaded executor.
2020-10-22 03:27:04 -07:00
Sergio Benitez
491b229582
Improve database config errors.
2020-10-21 23:54:54 -07:00
Sergio Benitez
aabbfcfe94
Add 'PoolResult' alias; rename 'DbError' to 'Error'.
2020-10-21 22:33:55 -07:00
Daniel Wiesenberg
f5fd1007e2
Move config extraction to 'Poolable' impls.
2020-10-21 22:33:15 -07:00
Sergio Benitez
17fd7f4286
Update minimum rustc to 1.46.
2020-10-21 19:56:12 -07:00
Sergio Benitez
bbfe2ba5cc
Point all docs and doc links to 'master' branch.
2020-10-21 04:54:24 -07:00
Sergio Benitez
4b4e918a70
Manage state, not 'lazy_static', in 'uuid' example.
2020-10-20 21:02:29 -07:00
George Cheng
0673986c32
Impl 'FromRequest' for 'IpAddr'.
...
Closes #1414 .
2020-10-20 20:51:26 -07:00
ThouCheese
080d586a35
Impl 'DerefMut' for 'Form', 'LenientForm'.
2020-10-20 20:45:43 -07:00
est31
b18cd6460e
Add AVIF (image/avif) as a known media type.
2020-10-20 20:40:18 -07:00
Sergio Benitez
730a2dcdbe
Implement 'Serialize' for 'Flash'.
...
Resolves #184 .
2020-10-20 20:29:55 -07:00
Sergio Benitez
7337321efb
Take '&mut Data' in 'on_request' fairings.
...
Resolves #1438 .
2020-10-20 20:22:32 -07:00