Commit Graph

982 Commits

Author SHA1 Message Date
Sergio Benitez b892236ea5 Add 'Config::active()' method. 2018-02-20 03:27:18 -08:00
messense ae8e9025d2 Eagerly read JSON data for deserialization.
Issue #547 identified a performance issue when serde's 'from_reader' is
used to deserialize incoming data. Using 'from_str' resolves the issue.
This commit swaps a use of 'from_reader' in favor of 'from_str' in
rocket_contrib's 'Json' implementation.

Additionally, this commit ensures that un-deserialized JSON data is
discarded as long as it is within the JSON data limit.

Closes #562.
2018-02-19 02:58:37 -08:00
Sergio Benitez 91edab51f8 Spiffy up 'uncased_eq' implementation. 2018-02-19 02:55:56 -08:00
Sergio Benitez c620411d92 Add 'keep_alive' configuration parameter.
The 'keep_alive' configuration parameter allows HTTP keep-alive timeouts
to be configured or for keep-alive to be disabled entirely.
2018-02-17 04:06:05 -08:00
Sergio Benitez c6841ba67a Remove use of unsafe in logger.rs. 2018-02-17 02:12:59 -08:00
Sergio Benitez de8e1978c5 Remove unsafe 'from_utf8_unchecked'; improve form parsing.
The 'FormItems' iterator now successfully parses empty keys and values
as well as keys without values.
2018-02-14 14:05:26 -08:00
Sergio Benitez 8b1aaed0ce Enforce trailing commas in 'known' macros. 2018-01-30 12:30:31 -08:00
Sergio Benitez 6de76c51bc Only pop a log level if one was previously pushed. 2018-01-29 13:25:33 -08:00
Sergio Benitez 3a8d0e8a9a Dynamically increase/decrease log level at launch.
This commit modifies the internal logger so that launch messages are
emitted with the proper "info" level. The approach is to temporarily
weaken the log level to "normal" during launch and reset it to the
user's setting after launching.

This commit also upgrades to 'log' 0.4.

Fixes #553.
2018-01-29 13:16:04 -08:00
Sergio Benitez f2331a831a Update handlebars to 0.30, tera to 0.11. 2018-01-23 18:53:55 -08:00
Sergio Benitez 944aa79a8f Update 'state' to 0.4. 2018-01-23 18:53:30 -08:00
Sergio Benitez f397e49a99 Various tiny improvements to shell scripts. 2018-01-23 18:53:02 -08:00
Sergio Benitez f0af77d917 Disable incremental compilation in testing script.
With incremental compilation, compilation output disk usage grows to
almost 10GB. This prevent that from happening.
2018-01-23 18:49:59 -08:00
Sergio Benitez 5a9d857329 Account for default config changes in config tests. 2018-01-20 11:36:35 -08:00
Sergio Benitez 2d7b4b4233 Print config info in all environments. 2018-01-20 10:55:01 -08:00
Sergio Benitez 9403006ba4 Fix guide for changes to default environments. 2018-01-20 10:02:21 -08:00
Sergio Benitez f9a950d1c7 Default to production environment on non-debug builds. 2018-01-20 09:58:52 -08:00
Donald Robertson 19f59b1f9b Use port 8000 as default for all environments.
Closes #317.
2018-01-20 09:43:19 -08:00
Pyry Kontio b0c1a0a07f Add default catcher for '504: Gateway Timeout'. 2018-01-19 11:44:00 -08:00
Sergio Benitez 5240f860cb Remove superfluous logic in 'Rocket.write_response()'. 2018-01-19 11:23:13 -08:00
Sergio Benitez d2727972fd Always strip bodies on 'HEAD' requests.
Closes #544.
Closes #514.
2018-01-19 11:21:56 -08:00
Sergio Benitez 72d2ccc2a5 Don't preallocate in 'Body.into_bytes()'. 2018-01-19 11:20:06 -08:00
Sergio Benitez f04dc195bd Update 'rusqlite' to fix dependency resolution. 2018-01-19 10:29:51 -08:00
Sergio Benitez 446181e5a6 Fix 'typed-uris-invalid-syntax' UI test for latest nightly. 2018-01-14 09:37:45 -08:00
Sergio Benitez 69abd4fc83 Update dependencies for 'ring' '0.13.0-alpha'.
Closes #533.
2018-01-13 10:51:33 -08:00
Sergio Benitez 267e04883b Add Travis 'env' to run tests with '--release'. 2018-01-13 10:18:26 -08:00
Sergio Benitez 68b49f5d74 Fix compiletest linker flags for release builds. 2018-01-13 10:18:11 -08:00
Sergio Benitez 0f9828d095 Pin 'hyper-sync-rustls' version. 2018-01-13 10:05:30 -08:00
Sergio Benitez dfc6fa13e4 Forward CLI arguments to Cargo in testing script. 2018-01-13 09:25:25 -08:00
Sergio Benitez 1ba71cdb25 Group 'Rocket.state()' method with other accessors. 2018-01-12 20:15:55 -08:00
Sergio Benitez a19d9221d7 Update copyright year in LICENSE-MIT. 2018-01-12 20:07:06 -08:00
Sergio Benitez e6a602cefc Revert nightly workaround in getting started guide. 2018-01-12 20:06:27 -08:00
Sergio Benitez b5bf5361b8 Revert nightly workaround information in README. 2018-01-12 19:57:36 -08:00
Sergio Benitez 4886ca49bf Update CHANGELOG for 0.3.6. 2018-01-12 19:45:52 -08:00
Sergio Benitez 6e968a03ee Update CHANGELOG for 0.3.5. 2018-01-12 19:45:40 -08:00
Sergio Benitez 5d4908e74a Update minimum nightly to '2018-01-12'.
The '2018-01-12' nightly release includes a commit that reverts the
change that broke 'ring', un-breaking 'ring', and thus un-breaking
Rocket. As a result, the '[patch]' workaround is no longer required.
Rocket is back on the latest nightly!
2018-01-12 19:44:21 -08:00
Sergio Benitez 8431bfc7ca Revert "Update README with changes to nightly requirements."
This reverts commit 9dc4c260f7.
2018-01-12 19:05:33 -08:00
Sergio Benitez 11b769438c Fix incorrect handling of nested 'attach' calls. 2018-01-12 08:34:53 -08:00
Zachary Golba 9bf33bdd1b Add 'application/vnd.api+json' as known media type. 2018-01-05 19:45:08 -08:00
Sergio Benitez e9c68ba666 Add regression test for issue #505. 2018-01-05 19:36:05 -08:00
Sergio Benitez a583137d96 Update 'state' to '0.3.3' for 'Storage.clone()' fix.
Fixes #505.
2018-01-05 19:36:05 -08:00
Sergio Benitez 65baa83fb4 Update dependencies.
* 'memchr' to 2.0
  * 'base64' to 0.9
  * 'smallvec' to 0.6
  * 'lazy_static' to 1.0

Update example dependencies.

  * 'rand' to 0.4
  * 'parking_lot' to 0.5
2018-01-05 02:00:26 -08:00
Sergio Benitez 1b77376162 Bump 'cookie' dependency for 'SameSite' changes. 2018-01-04 23:47:28 -08:00
Sergio Benitez b352f7c24a Update 'compiletest' to 0.3.5. 2018-01-03 02:46:11 -08:00
Sergio Benitez 24b2818f8c Update diesel to 1.0. 2018-01-03 01:38:11 -08:00
calhilcaw 401bedebb2 Update docs and examples for diesel 1.0.0-rc1. 2018-01-03 01:38:05 -08:00
Stanislav Ivanov 70413b155f Add 'LocalRequest::private_cookie()'.
Resolves #368.
2017-12-29 09:16:08 -08:00
Sergio Benitez dd07c367d5 Add 'Request::client_ip()' method. 2017-12-29 00:40:09 -08:00
Alexander Mielczarek c2899b2391 Don't rewrite request remote. Add 'Request::real_ip()'.
Resolves #479.
2017-12-28 23:51:14 -08:00
Richard McCormack 2f7961f410 Fix typo in state guide: 'simple' -> 'simply'. 2017-12-28 23:21:53 -08:00