File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -828,9 +828,12 @@ pub fn download(req: &mut Request) -> CargoResult<Response> {
828
828
let crate_name = & req. params ( ) [ "crate_id" ] ;
829
829
let version = & req. params ( ) [ "version" ] ;
830
830
831
- match increment_download_counts ( req, crate_name, version) {
832
- _ => { } // do not try, ignore failures
833
- }
831
+ // Ignore failure to update download counts. We might be a mirror that
832
+ // doesn't have the crates available in the database (so can't look them
833
+ // up) and therefore doesn't care about the download counts, but we can
834
+ // still construct valid crate URLs. Cargo will verify that the crate and
835
+ // version are in the crate index before making a request to this route.
836
+ let _ = increment_download_counts ( req, crate_name, version) ;
834
837
835
838
let redirect_url = format ! ( "https://{}/crates/{}/{}-{}.crate" ,
836
839
req. app( ) . bucket. host( ) ,
You can’t perform that action at this time.
0 commit comments