diff options
author | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-03-08 21:23:33 +0000 |
---|---|---|
committer | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-03-08 21:23:33 +0000 |
commit | eec5f353ffe584fcdcd7e43670fbd30d9e9f04e3 (patch) | |
tree | bf1f40abc395fbcde8386d4344b911267d05d5ef /src/listing.rs | |
parent | Working example of tar.gz (diff) | |
download | miniserve-eec5f353ffe584fcdcd7e43670fbd30d9e9f04e3.tar.gz miniserve-eec5f353ffe584fcdcd7e43670fbd30d9e9f04e3.zip |
Refactored some code
Diffstat (limited to 'src/listing.rs')
-rw-r--r-- | src/listing.rs | 4 |
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", |