Sergio Benitez
68f6d51ebe
New version: 0.2.7.
2017-05-26 20:06:01 -07:00
Sergio Benitez
41832a57d1
Hide the routes method.
2017-05-14 21:12:04 -07:00
Sergio Benitez
deaa6e7796
Fix the SocketAddr request guard docs: it's not unconditional.
2017-04-28 15:10:09 -05:00
Sergio Benitez
f0a7206694
Backport benchmarks.
2017-04-23 00:26:19 -07:00
Sergio Benitez
7fa99b75dd
Add Rocket::routes() method to get all routes. Add some internal benchmarks.
2017-04-23 00:13:47 -07:00
Sergio Benitez
d5a70b76cd
New version: 0.2.6.
2017-04-17 16:23:27 -07:00
Sergio Benitez
9f0c8a80ae
New version: 0.2.5.
2017-04-16 14:25:16 -07:00
Sergio Benitez
355da8a1ba
New version: 0.2.4.
2017-03-30 19:50:07 -07:00
Sergio Benitez
1fb0231d87
Rewrite some markdown for commonmark.
2017-03-30 19:44:59 -07:00
Sergio Benitez
b802d677f5
Fix 'Response::join' docs.
2017-03-23 03:53:12 -07:00
Sergio Benitez
bd66cc1313
New version: 0.2.3.
2017-03-22 19:44:33 -07:00
Sergio Benitez
c18e121f94
Remove spurious new line.
2017-03-22 19:44:32 -07:00
Sergio Benitez
b303ae08f1
Remove pub_restricted feature: it's stable!
2017-03-22 19:44:32 -07:00
Sergio Benitez
d1631ea845
Don't use hyper directly in request tests.
2017-03-22 19:44:32 -07:00
Alan Stoate
cb41ffc033
Update `Catcher` example: returns Status::NotFound on 404.
2017-03-22 19:44:32 -07:00
Sergio Benitez
8e7c77fe21
Cleanup request tests; move into separate file.
2017-03-22 19:44:31 -07:00
Scott Schroeder
898533f1e6
Preserve multiple incoming header values.
2017-03-22 19:44:31 -07:00
Artem Biryukov
e0a1131408
Add `get_slice` and `get_table` methods to `Config`.
2017-03-22 19:44:31 -07:00
Sergio Benitez
6be902162d
New version: 0.2.2.
2017-02-26 18:31:15 -08:00
Sergio Benitez
d99de8e05b
New version: 0.2.1.
2017-02-24 13:57:33 -08:00
Sergio Benitez
efbfbd1045
Add 'into_bytes' and 'into_inner' methods to Body.
2017-02-24 13:20:35 -08:00
Sergio Benitez
62a75cdde6
Use `append_raw` to ensure all headers are set.
...
Fixes #206 .
2017-02-22 11:25:30 -08:00
Sergio Benitez
d89c2a0cb5
Presort routes instead of sorting on each route.
2017-02-18 00:23:20 -08:00
Michael Aaron Murphy
4161949a1c
Add webp, ttf, otf, woff, and woff2 as known Content-Types.
2017-02-17 19:13:45 -08:00
Sergio Benitez
d8afb4c7fa
Implement Display and Error for ConfigError.
...
Closes #189 .
2017-02-15 01:32:57 -08:00
Sergio Benitez
d8b90ebf5f
Readd missing config address test.
2017-02-14 23:34:27 -08:00
Sergio Benitez
0c963da1fd
Fix IPv6 address parsing and validation.
2017-02-14 23:10:36 -08:00
Sergio Benitez
1e1ff3bd23
Explicitly delete flash cookie so that path is set.
2017-02-08 23:53:29 -08:00
Sergio Benitez
3c8dd0fad8
Fix fallout from latest cargo nightly.
2017-02-08 00:55:22 -08:00
Sergio Benitez
46f753e128
Fix typo in manage docs: referes -> refers.
2017-02-06 10:40:43 -08:00
Sergio Benitez
c7db553286
New version: 0.2.0.
2017-02-06 05:35:19 -08:00
Sergio Benitez
20a548b11b
Add percent_encode method to URI.
2017-02-06 03:41:12 -08:00
Sergio Benitez
ad8f55f64b
Back to expressibility.
2017-02-05 20:21:57 -08:00
Sergio Benitez
0b69a5d8f7
Ensure routes with and without query params don't collide.
2017-02-05 01:43:53 -08:00
Sergio Benitez
e966925455
Use full URI in codegen routes; log query params in routes.
2017-02-05 01:34:48 -08:00
Sergio Benitez
8b39b88e46
We're searching for expressiveness.
2017-02-03 19:21:19 -08:00
Sergio Benitez
391628dea9
Fix broken link to IntoValue.
2017-02-03 17:15:29 -08:00
Sergio Benitez
0e82eb0b31
Fixup forms documentation for new features.
2017-02-03 16:56:29 -08:00
Sergio Benitez
aefa2f1494
Use pub(crate) to enforce doc(hidden).
2017-02-03 02:17:06 -08:00
Sergio Benitez
bf1b9e76fd
Tweak http module docs.
2017-02-03 01:27:41 -08:00
Sergio Benitez
a8356de183
Fully document `config` module. Deprecate Config::{set, default_for}.
2017-02-03 01:15:01 -08:00
Sergio Benitez
5abb8d99b4
Clarify manage method docs.
2017-02-02 18:16:57 -08:00
Sergio Benitez
988236f272
Add documentation for State request guard.
2017-02-02 18:01:00 -08:00
Sergio Benitez
a9c3b8a919
Silence warnings during testing.
2017-02-02 02:16:21 -08:00
Garrett Squire
11e90f525f
Update status code for form processing failure.
2017-02-01 18:29:29 -08:00
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
Sergio Benitez
cc22836867
Precisely route formats. Make 'content_type' an 'Option' in 'Request'.
...
This commit changes the routing algorithm. In particular, it enforces
precise matching of formats. With this change, a route with a specified
format only matches requests that have the same format specified. A
route with no format specified matches any request's format. This is
contrast to the previous behavior, where a route without a specified
format would match requests regardless of their format or whether one
was specified.
This commit also changes the following:
* The return type of the 'content_type' method of 'Request' is now
'Option<ContentType>'.
* The 'ContentType' request guard forwards when the request has no
specified ContentType.
* The 'add_header' and 'replace_header' methods take the header
argument generically.
Closes #120 .
2017-02-01 03:12:24 -08:00
Sergio Benitez
3235e1e5e6
Make 'false' the default value for bools in forms.
2017-02-01 00:12:11 -08:00
Sergio Benitez
35bbb8b60b
Use 'to_string' to format Hyper headers.
2017-01-31 17:32:35 -08:00
Sergio Benitez
374593c2f0
Use 'ContentType::Plain' for 'String' responses.
...
Resolves #49 .
2017-01-31 02:43:19 -08:00