You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let date_updated = parse_timespec(&res.last_modified.unwrap())?;
which calls .unwrap() on the last_modified_date. But this makes no sense: that file hasn't been updated in weeks, and neither has the rest of the storage code.
// NOTE: trying to upload a file ending with `/` will behave differently in test and prod.
// NOTE: On s3, it will succeed and create a file called `/`.
// NOTE: On min.io, it will fail with 'Object name contains unsupported characters.'
What's happening is that locally min.io gives a 404 and it delegates to the router, no problem. But in prod, AWS gives a directory listing instead, which has no last_modified date.
The solution should be to skip the database for any URL ending in /; only index.html should be normalized and served.
This fixesrust-lang#55 while avoiding the mistake of placing the router_handler
after the database_file_handler which acts differently in test and prod
(rust-lang#1051).
Uh oh!
There was an error while loading. Please reload this page.
Backtrace
The error comes from
docs.rs/src/storage/s3.rs
Line 124 in a2ab0d3
which calls
.unwrap()
on the last_modified_date. But this makes no sense: that file hasn't been updated in weeks, and neither has the rest of the storage code.The clue is here:
docs.rs/src/storage/s3.rs
Lines 311 to 313 in a2ab0d3
What's happening is that locally min.io gives a 404 and it delegates to the router, no problem. But in prod, AWS gives a directory listing instead, which has no last_modified date.
The solution should be to skip the database for any URL ending in /; only index.html should be normalized and served.
This regression was introduced in https://github.com/rust-lang/docs.rs/pull/1043/files#diff-0aa36516a2a42b271d0c346c642fb5eaR181, which went through the storage backend for
/
before looking at the router (cc @robinhundt, but I'll take care of fixing it). This is making me rethink that change: we should only look at S3 after we checked it's not a recognized route.The text was updated successfully, but these errors were encountered: