aboutsummaryrefslogtreecommitdiffstats
path: root/src/listing.rs
diff options
context:
space:
mode:
authorboasting-squirrel <boasting.squirrel@gmail.com>2019-03-08 21:23:33 +0000
committerboasting-squirrel <boasting.squirrel@gmail.com>2019-03-08 21:23:33 +0000
commiteec5f353ffe584fcdcd7e43670fbd30d9e9f04e3 (patch)
treebf1f40abc395fbcde8386d4344b911267d05d5ef /src/listing.rs
parentWorking example of tar.gz (diff)
downloadminiserve-eec5f353ffe584fcdcd7e43670fbd30d9e9f04e3.tar.gz
miniserve-eec5f353ffe584fcdcd7e43670fbd30d9e9f04e3.zip
Refactored some code
Diffstat (limited to 'src/listing.rs')
-rw-r--r--src/listing.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listing.rs b/src/listing.rs
index 565b5bf..c9542b8 100644
--- a/src/listing.rs
+++ b/src/listing.rs
@@ -229,9 +229,9 @@ pub fn directory_listing<S>(
if let Some(compression_method) = &download {
match archive::create_archive_file(&compression_method, &dir.path) {
- Ok((filename, content_length, content)) => Ok(HttpResponse::Ok()
+ Ok((filename, content)) => Ok(HttpResponse::Ok()
.content_type("application/tar")
- .content_length(content_length as u64)
+ .content_length(content.len() as u64)
.header("Content-Transfer-Encoding", "binary")
.header(
"Content-Disposition",