Rocket/core/lib/src
Paul Lietar 52de9a1fa6 Ensure 'TempFile' flushes when persisted.
Tokio's `File::write_all()` method has an unexpected quirk: it doesn't
actually write all the requested content to the file when the returned
future resolves. Instead, the write is attempted and queued. This means
that the `persist()` method can resolve without the data being persisted
to the file system. Subsequent reads of the ostensibly written-to file
can thus fail to contain the expected data.

An call to `flush()` following `write_all()` would circumvent the issue.
Alternatively, calling `fs::write()` actually writes to the file system
before returning and requires fewer lines of code. This commit thus
swaps the call to `write_all()` with `fs::write()`.
2024-01-17 21:53:12 -08:00
..
catcher Rename 'Outcome::Failure' to 'Outcome::Error'. 2023-11-01 18:50:55 -05:00
config Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
data Document '&[u8]' form/data guard, limits. 2023-11-01 18:56:48 -05:00
fairing Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
form Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
fs Ensure 'TempFile' flushes when persisted. 2024-01-17 21:53:12 -08:00
local Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
request Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
response Document "reconnect ad-infinitum" SSE pitfall. 2024-01-17 21:53:12 -08:00
route Improve forwarding status code precision. 2023-11-01 18:50:58 -05:00
router Fix a bunch of typos. 2023-03-23 16:27:08 -07:00
serde Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
shield Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
cookies.rs Set 'SameSite' to 'Lax' on removal cookies. 2023-11-01 18:50:58 -05:00
error.rs Rename 'Outcome::Failure' to 'Outcome::Error'. 2023-11-01 18:50:55 -05:00
ext.rs Rework TLS listener/connection implementations. 2022-05-03 13:56:25 -07:00
lib.rs Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
log.rs Update 'SergioBenitez/Rocket' to 'rwf2/Rocket'. 2023-11-22 21:41:51 +01:00
mtls.rs Update version numbers for 0.5.0. 2023-11-17 16:38:14 +01:00
outcome.rs Improve forwarding status code precision. 2023-11-01 18:50:58 -05:00
phase.rs Update 'state' to 0.6. 2023-10-26 19:41:28 -05:00
rocket.rs Update 'yansi' to 1.0.0-rc. 2023-10-26 19:53:24 -05:00
sentinel.rs Fix a bunch of typos. 2023-03-23 16:27:08 -07:00
server.rs Fix min dependency versions. Update MSRV to 1.64. 2024-01-17 21:42:08 -08:00
shutdown.rs Protect graceful shutdown against runaway I/O. 2021-05-31 23:47:52 -07:00
state.rs Rename 'Outcome::Failure' to 'Outcome::Error'. 2023-11-01 18:50:55 -05:00
trip_wire.rs Protect graceful shutdown against runaway I/O. 2021-05-31 23:47:52 -07:00