aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Cargo.lock12
-rw-r--r--Cargo.toml2
-rw-r--r--README.md28
-rw-r--r--src/auth.rs2
4 files changed, 8 insertions, 36 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 6016cf5..907169b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -786,9 +786,9 @@ dependencies = [
"percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)",
"simplelog 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)",
"tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
"yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1338,16 +1338,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "structopt"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "structopt-derive"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2047,8 +2047,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
"checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b"
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
-"checksum structopt 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad348dc73012fcf78c71f06f9d942232cdd4c859d4b6975e27836c3efc0c3"
-"checksum structopt-derive 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ef98172b1a00b0bec738508d3726540edcbd186d50dfd326f2b1febbb3559f04"
+"checksum structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3d0760c312538987d363c36c42339b55f5ee176ea8808bbe4543d484a291c8d1"
+"checksum structopt-derive 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "528aeb7351d042e6ffbc2a6fb76a86f9b622fdf7c25932798e7a82cb03bc94c6"
"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9"
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
"checksum tar 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)" = "904b43da53c99b929c4484fa281e5535f2eb86b3040de3e3e5b69708e2a8bd65"
diff --git a/Cargo.toml b/Cargo.toml
index ad5a144..3851aee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,7 +32,7 @@ htmlescape = "0.3.1"
bytesize = "1.0.0"
nanoid = "0.2.0"
alphanumeric-sort = "1.0.6"
-structopt = "0.2.14"
+structopt = "0.2.15"
chrono = "0.4.6"
chrono-humanize = "0.0.11"
maud = { version = "0.20.0", features = ["actix-web"] }
diff --git a/README.md b/README.md
index cc8d30f..c2a85e4 100644
--- a/README.md
+++ b/README.md
@@ -37,34 +37,6 @@ Sometimes this is just a more practical and quick way than doing things properly
miniserve -i 192.168.0.1 -i 10.13.37.10 -i ::1 /tmp/myshare
-### Sort files for easier navigation
- miniserve --sort=natural /tmp/myshare # (default behaviour)
- # 1/
- # 2/
- # 3
- # 11
-
- miniserve --sort=alpha /tmp/myshare
- # 1/
- # 11
- # 2/
- # 3
-
- miniserve --sort=dirsfirst /tmp/myshare
- # 1/
- # 2/
- # 11
- # 3
-
- miniserve --sort=date /tmp/myshare
- # list files in chronological order (most recent files on top of the list)
-
- miniserve --reverse /tmp/myshare
- # 11
- # 3
- # 2/
- # 1/
-
## Features
- Easy to use
diff --git a/src/auth.rs b/src/auth.rs
index 7b72b21..e8600fb 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -59,7 +59,7 @@ impl Middleware<crate::MiniserveConfig> for Auth {
if auth_req.username != required_auth.username
|| auth_req.password != required_auth.password
{
- let new_resp = HttpResponse::Forbidden().finish();
+ let new_resp = HttpResponse::Unauthorized().finish();
return Ok(Response::Done(new_resp));
}
} else {