wala-rust

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

commit 4bced6b7b177c85f77b2d5564a41f2fba59bed4f
parent 1bbb2d50001a646ee86b30b13046b1a0420ab05c
Author: lash <dev@holbrook.no>
Date:   Thu, 22 Dec 2022 19:49:17 +0000

Revert to application/octet-stream if missing mime type

Diffstat:
MCHANGELOG | 2++
MCargo.toml | 2+-
Msrc/arg.rs | 2+-
Msrc/response.rs | 4+++-
4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,5 @@ +- 0.1.3 + * Fall back to application/octet-stream if mime type is missing - 0.1.2 * verify pgp signature from reader instead of copying to memory * announce capabilities in response headers diff --git a/Cargo.toml b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wala" -version = "0.1.2" +version = "0.1.3" edition = "2021" rust-version = "1.60" license = "GPL-3.0-or-later" diff --git a/src/arg.rs b/src/arg.rs @@ -53,7 +53,7 @@ impl Settings { pub fn from_args() -> Settings { let mut o = App::new("wala"); - o = o.version("0.0.1"); + o = o.version(env!("CARGO_PKG_VERSION")); o = o.author("Louis Holbrook <dev@holbrook.no>"); o = o.arg( Arg::with_name("host") diff --git a/src/response.rs b/src/response.rs @@ -134,7 +134,9 @@ pub fn exec_response(req: Request, r: RequestResult) { }; res.add_header(h); }, - _ => {}, + _ => { + content_type.push_str("application/octet-stream"); + }, }; match r.n { Some(v) => {