aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/composer_repository.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/repository/composer_repository.rs')
-rw-r--r--crates/shirabe/src/repository/composer_repository.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/shirabe/src/repository/composer_repository.rs b/crates/shirabe/src/repository/composer_repository.rs
index 74f1426..0d2fa2f 100644
--- a/crates/shirabe/src/repository/composer_repository.rs
+++ b/crates/shirabe/src/repository/composer_repository.rs
@@ -3253,14 +3253,15 @@ impl ComposerRepository {
// if the file is in the cache, we fake a 304 Not Modified to allow the process to continue
if last_modified_time.is_some() {
- let resp = Response::new_fake(&self.url, 304, IndexMap::new(), String::new());
+ let resp = Response::new(self.url.clone(), Some(304), Vec::new(), Some(String::new()));
return self.async_fetch_file_accept(resp, filename, cache_key);
}
// special error code returned when network is being artificially disabled
if let Some(te) = e.downcast_ref::<TransportException>() {
if te.get_status_code() == Some(499) {
- let resp = Response::new_fake(&self.url, 404, IndexMap::new(), String::new());
+ let resp =
+ Response::new(self.url.clone(), Some(404), Vec::new(), Some(String::new()));
return self.async_fetch_file_accept(resp, filename, cache_key);
}
}