Skip to content

Commit 304ec51

Browse files
committed
WIP
1 parent e718487 commit 304ec51

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

src/storage/mod.rs

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -345,26 +345,17 @@ impl AsyncStorage {
345345
path: &str,
346346
archive_storage: bool,
347347
) -> Result<Blob> {
348-
self.stream_source_file(name, version, latest_build_id, path, archive_storage)
349-
.await?
350-
.materialize(self.max_file_size_for(path))
351-
.await
352-
}
353-
354-
pub(crate) async fn stream_source_file(
355-
&self,
356-
name: &str,
357-
version: &Version,
358-
latest_build_id: Option<BuildId>,
359-
path: &str,
360-
archive_storage: bool,
361-
) -> Result<StreamingBlob> {
362348
Ok(if archive_storage {
363-
self.stream_from_archive(&source_archive_path(name, version), latest_build_id, path)
364-
.await?
349+
self.get_from_archive(
350+
&source_archive_path(name, version),
351+
latest_build_id,
352+
path,
353+
self.max_file_size_for(path),
354+
)
355+
.await?
365356
} else {
366357
let remote_path = format!("sources/{name}/{version}/{path}");
367-
self.get_stream(&remote_path).await?
358+
self.get(&remote_path, self.max_file_size_for(path)).await?
368359
})
369360
}
370361

src/web/statics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ async fn set_needed_static_headers(req: Request, next: Next) -> Response {
5656
response
5757
}
5858

59-
#[axum::debug_middleware]
6059
async fn conditional_get(
6160
partial_uri: Uri,
6261
method: Method,

0 commit comments

Comments
 (0)