diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2025-02-07 12:48:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-07 12:48:50 +0000 |
commit | 77b1c1cd0bfab5d4dc5e0994050fabd4a19cdd0f (patch) | |
tree | 0b9e157598d2361397ee09e7f196938d284c48f9 | |
parent | chore: clean up (diff) | |
parent | Add CHANGELOG entry for #1473 (diff) | |
download | miniserve-77b1c1cd0bfab5d4dc5e0994050fabd4a19cdd0f.tar.gz miniserve-77b1c1cd0bfab5d4dc5e0994050fabd4a19cdd0f.zip |
Merge branch 'master' into upload-progress-bar
-rw-r--r-- | CHANGELOG.md | 15 | ||||
-rw-r--r-- | Cargo.lock | 2114 | ||||
-rw-r--r-- | Cargo.toml | 27 | ||||
-rw-r--r-- | README.md | 157 | ||||
-rw-r--r-- | data/style.scss | 9 | ||||
-rw-r--r-- | src/archive.rs | 24 | ||||
-rw-r--r-- | src/args.rs | 16 | ||||
-rw-r--r-- | src/config.rs | 37 | ||||
-rw-r--r-- | src/errors.rs | 3 | ||||
-rw-r--r-- | src/file_op.rs | 18 | ||||
-rw-r--r-- | src/listing.rs | 39 | ||||
-rw-r--r-- | src/main.rs | 56 | ||||
-rw-r--r-- | src/pipe.rs | 2 | ||||
-rw-r--r-- | src/renderer.rs | 20 | ||||
-rw-r--r-- | src/webdav_fs.rs | 83 | ||||
-rw-r--r-- | tests/archive.rs | 18 | ||||
-rw-r--r-- | tests/auth.rs | 147 | ||||
-rw-r--r-- | tests/auth_file.rs | 49 | ||||
-rw-r--r-- | tests/bind.rs | 10 | ||||
-rw-r--r-- | tests/cli.rs | 8 | ||||
-rw-r--r-- | tests/create_directories.rs | 29 | ||||
-rw-r--r-- | tests/fixtures/mod.rs | 72 | ||||
-rw-r--r-- | tests/header.rs | 14 | ||||
-rw-r--r-- | tests/navigation.rs | 38 | ||||
-rw-r--r-- | tests/qrcode.rs | 15 | ||||
-rw-r--r-- | tests/raw.rs | 51 | ||||
-rw-r--r-- | tests/readme.rs | 52 | ||||
-rw-r--r-- | tests/serve_request.rs | 67 | ||||
-rw-r--r-- | tests/tls.rs | 7 | ||||
-rw-r--r-- | tests/upload_files.rs | 16 | ||||
-rw-r--r-- | tests/utils/mod.rs | 4 | ||||
-rw-r--r-- | tests/webdav.rs | 150 |
32 files changed, 2189 insertions, 1178 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index bdf2f8e..3f0fedb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/). <!-- next-header --> ## [Unreleased] - ReleaseDate +- Add date pill and sort links for mobile views [#1473](https://github.com/svenstaro/miniserve/pull/1473) (thanks @Flat) + +## [0.29.0] - 2025-02-06 +- Make URL encoding fully WHATWG-compliant [#1454](https://github.com/svenstaro/miniserve/pull/1454) (thanks @cyqsimon) +- Fix `OVERWRITE_FILES` env var not being prefixed by `MINISERVE_` [#1457](https://github.com/svenstaro/miniserve/issues/1457) +- Change `font-weight` of regular files to be `normal` to improve readability [#1471](https://github.com/svenstaro/miniserve/pull/1471) (thanks @shaicoleman) +- Add webdav support [#1415](https://github.com/svenstaro/miniserve/pull/1415) (thanks @ahti) +- Move favicon and css to stable, non-random routes [#1472](https://github.com/svenstaro/miniserve/pull/1472) (thanks @ahti) + +## [0.28.0] - 2024-09-12 - Fix wrapping text in mobile view when the file name too long [#1379](https://github.com/svenstaro/miniserve/pull/1379) (thanks @chaibiq) - Fix missing drag-form when dragging file in to browser [#1390](https://github.com/svenstaro/miniserve/pull/1390) (thanks @chaibiq) - Improve documentation for the --header parameter [#1389](https://github.com/svenstaro/miniserve/pull/1389) (thanks @orwithout) +- Don't show mkdir option when the directory is not upload allowed [#1442](https://github.com/svenstaro/miniserve/pull/1442) (thanks @Atreyagaurav) ## [0.27.1] - 2024-03-16 - Add `Add file and folder symbols` [#1365](https://github.com/svenstaro/miniserve/pull/1365) (thanks @chaibiq) @@ -201,7 +212,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Some theme related bug fixes (thanks @boastful-squirrel) <!-- next-url --> -[Unreleased]: https://github.com/svenstaro/miniserve/compare/v0.27.1...HEAD +[Unreleased]: https://github.com/svenstaro/miniserve/compare/v0.29.0...HEAD +[0.29.0]: https://github.com/svenstaro/miniserve/compare/v0.28.0...v0.29.0 +[0.28.0]: https://github.com/svenstaro/miniserve/compare/v0.27.1...v0.28.0 [0.27.1]: https://github.com/svenstaro/miniserve/compare/v0.27.0...v0.27.1 [0.27.0]: https://github.com/svenstaro/miniserve/compare/v0.26.0...v0.27.0 [0.26.0]: https://github.com/svenstaro/miniserve/compare/v0.25.0...v0.26.0 @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "actix-codec" @@ -8,7 +8,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.5.0", + "bitflags", "bytes", "futures-core", "futures-sink", @@ -21,15 +21,15 @@ dependencies = [ [[package]] name = "actix-files" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0bdd6ff79de7c9a021f5d9ea79ce23e108d8bfc9b49b5b4a2cf6fad5a35212" +checksum = "0773d59061dedb49a8aed04c67291b9d8cf2fe0b60130a381aab53c6dd86e9be" dependencies = [ "actix-http", "actix-service", "actix-utils", "actix-web", - "bitflags 2.5.0", + "bitflags", "bytes", "derive_more", "futures-core", @@ -44,9 +44,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.7.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb9843d84c775696c37d9a418bbb01b932629d01870722c0f13eb3f95e2536d" +checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" dependencies = [ "actix-codec", "actix-rt", @@ -55,7 +55,7 @@ dependencies = [ "actix-utils", "ahash", "base64 0.22.1", - "bitflags 2.5.0", + "bitflags", "brotli", "bytes", "bytestring", @@ -63,8 +63,8 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "h2", - "http", + "h2 0.3.26", + "http 0.2.12", "httparse", "httpdate", "itoa", @@ -89,19 +89,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "actix-multipart" -version = "0.6.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b960e2aea75f49c8f069108063d12a48d329fc8b60b786dfc7552a9d5918d2d" +checksum = "d5118a26dee7e34e894f7e85aa0ee5080ae4c18bf03c0e30d49a80e418f00a53" dependencies = [ "actix-multipart-derive", "actix-utils", "actix-web", - "bytes", "derive_more", "futures-core", "futures-util", @@ -110,6 +109,7 @@ dependencies = [ "log", "memchr", "mime", + "rand", "serde", "serde_json", "serde_plain", @@ -119,15 +119,15 @@ dependencies = [ [[package]] name = "actix-multipart-derive" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0a77f836d869f700e5b47ac7c3c8b9c8bc82e4aec861954c6198abee3ebd4d" +checksum = "e11eb847f49a700678ea2fa73daeb3208061afa2b9d1a8527c03390f4c4a1c6b" dependencies = [ "darling", "parse-size", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] @@ -138,7 +138,7 @@ checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", "cfg-if", - "http", + "http 0.2.12", "regex", "regex-lite", "serde", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" +checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" dependencies = [ "futures-core", "tokio", @@ -157,9 +157,9 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" +checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" dependencies = [ "actix-rt", "actix-service", @@ -195,11 +195,11 @@ dependencies = [ "futures-core", "impl-more", "pin-project-lite", + "rustls-pki-types", "tokio", - "tokio-rustls 0.23.4", + "tokio-rustls", "tokio-util", "tracing", - "webpki-roots 0.22.6", ] [[package]] @@ -214,9 +214,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.6.0" +version = "4.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cf67dadb19d7c95e5a299e2dda24193b89d5d4f33a3b9800888ede9e19aa32" +checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" dependencies = [ "actix-codec", "actix-http", @@ -232,16 +232,19 @@ dependencies = [ "bytes", "bytestring", "cfg-if", + "cookie", "derive_more", "encoding_rs", "futures-core", "futures-util", + "impl-more", "itoa", "language-tags", "log", "mime", "once_cell", "pin-project-lite", + "regex", "regex-lite", "serde", "serde_json", @@ -254,25 +257,25 @@ dependencies = [ [[package]] name = "actix-web-codegen" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "actix-web-httpauth" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d613edf08a42ccc6864c941d30fe14e1b676a77d16f1dbadc1174d065a0a775" +checksum = "456348ed9dcd72a13a1f4a660449fafdecee9ac8205552e286809eb5b0b29bd3" dependencies = [ "actix-utils", "actix-web", - "base64 0.21.7", + "base64 0.22.1", "futures-core", "futures-util", "log", @@ -281,18 +284,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "adler32" @@ -307,7 +310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -339,9 +342,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alphanumeric-sort" @@ -366,9 +369,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -381,62 +384,64 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arbitrary" -version = "1.3.2" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" dependencies = [ "derive_arbitrary", ] [[package]] name = "assert_cmd" -version = "2.0.14" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" +checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d" dependencies = [ "anstyle", "bstr", "doc-comment", + "libc", "predicates", "predicates-core", "predicates-tree", @@ -445,9 +450,9 @@ dependencies = [ [[package]] name = "assert_fs" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd762e110c8ed629b11b6cde59458cc1c71de78ebbcc30099fc8e0403a2a2ec" +checksum = "7efdb1fdb47602827a342857666feb372712cbc64b414172bd6b167a02927674" dependencies = [ "anstyle", "doc-comment", @@ -459,24 +464,41 @@ dependencies = [ ] [[package]] +name = "async-trait" +version = "0.1.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -508,15 +530,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "block-buffer" @@ -540,9 +556,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.1" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -550,9 +566,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.1" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", "regex-automata", @@ -561,15 +577,21 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" + +[[package]] +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "bytesize" @@ -579,22 +601,31 @@ checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "bytestring" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" +checksum = "e465647ae23b2823b0753f50decb2d5a86d2bb2cac04788fafd1f80e45378e5f" dependencies = [ "bytes", ] [[package]] +name = "caseless" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6fd507454086c8edfd769ca6ada439193cdb209c7681712ef6275cccbfe5d8" +dependencies = [ + "unicode-normalization", +] + +[[package]] name = "cc" -version = "1.0.98" +version = "1.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "755717a7de9ec452bf7f3f1a3099085deabd7f2962b861dae91ecd7a365903d2" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -604,17 +635,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets", ] [[package]] @@ -628,9 +666,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff" dependencies = [ "clap_builder", "clap_derive", @@ -638,9 +676,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" dependencies = [ "anstream", "anstyle", @@ -651,36 +689,36 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.2" +version = "4.5.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" +checksum = "375f9d8255adeeedd51053574fd8d4ba875ea5fa558e86617b07f09f1680c8b6" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clap_mangen" -version = "0.2.20" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dd95b5ebb5c1c54581dd6346f3ed6a79a3eef95dd372fc2ac13d535535300e" +checksum = "724842fa9b144f9b89b3f3d371a89f3455eea660361d13a554f68f8ae5d6c13a" dependencies = [ "clap", "roff", @@ -694,31 +732,28 @@ checksum = "b9e769b5c8c8283982a987c6e948e540254f1058d5a74b8794914d4ef5fc2a24" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" dependencies = [ - "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "comrak" -version = "0.24.1" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a972c8ec1be8065f7b597b5f7f5b3be535db780280644aebdcd1966decf58dc" +checksum = "52602e10393cfaaf8accaf707f2da743dc22cbe700a343ff8dbc9e5e04bc6b74" dependencies = [ - "derive_builder", + "caseless", "entities", "memchr", - "once_cell", - "regex", "slug", "typed-arena", "unicode_categories", @@ -731,6 +766,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] +name = "cookie" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] name = "core-foundation" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -742,9 +788,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -757,9 +803,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -775,9 +821,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -794,9 +840,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -810,9 +856,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -820,97 +866,99 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "dary_heap" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7762d17f1241643615821a8455a0b2c3e803784b058693d990b11f2dce25a0ca" +checksum = "04d2cd9c18b9f454ed67da600630b021a8a80bf33f8c95896ab33aaf1c26b728" [[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "derive_arbitrary" -version = "1.3.2" +name = "dav-server" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +checksum = "23a9e373ca09a43ad20c0b7805fcb4b489713f049a3ee2750ed61efa72f9cde9" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "actix-web", + "bytes", + "futures-channel", + "futures-util", + "headers", + "htmlescape", + "http 1.2.0", + "http-body", + "http-body-util", + "lazy_static", + "libc", + "log", + "lru", + "mime_guess", + "parking_lot", + "percent-encoding", + "pin-project", + "pin-utils", + "regex", + "time", + "tokio", + "url", + "uuid", + "xml-rs", + "xmltree", ] [[package]] -name = "derive_builder" -version = "0.20.0" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "derive_builder_macro", + "powerfmt", ] [[package]] -name = "derive_builder_core" -version = "0.20.0" +name = "derive_arbitrary" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ - "darling", "proc-macro2", "quote", - "syn 2.0.66", -] - -[[package]] -name = "derive_builder_macro" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" -dependencies = [ - "derive_builder_core", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "3da29a38df43d6f156149c9b43ded5e018ddff2a855cf2cfd62e8cd7d079c69f" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.98", ] [[package]] @@ -942,14 +990,27 @@ dependencies = [ ] [[package]] +name = "digest_auth" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3054f4e81d395e50822796c5e99ca522e6ba7be98947d6d4b0e5e61640bdb894" +dependencies = [ + "digest", + "hex", + "md-5", + "rand", + "sha2", +] + +[[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] @@ -960,9 +1021,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -981,12 +1042,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -997,33 +1058,33 @@ checksum = "aa6c2a740a5d6940f90a0f13b5828440c2a7160bd1e235cf934d5df0e7a3e1ad" [[package]] name = "fast_qr" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4415f4c642f04fea6ada6ff450018f3c28c1e7248528584718220c449d7f5f4" +checksum = "16e326670ab63ef13c7699301dbb3441573ba3288e83c3bb9efaacc91a33fd01" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1031,9 +1092,9 @@ dependencies = [ [[package]] name = "float-cmp" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" dependencies = [ "num-traits", ] @@ -1045,6 +1106,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] name = "form_urlencoded" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1065,9 +1147,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1080,9 +1162,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1090,15 +1172,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1107,32 +1189,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -1142,9 +1224,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1177,27 +1259,39 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] [[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets", +] + +[[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -1212,33 +1306,33 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.5.0", + "bitflags", "ignore", "walkdir", ] [[package]] name = "grass" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a46def7216d331efa51a6aa796ef777bfdfe9605378382827a553344b7e5eefc" +checksum = "f7a68216437ef68f0738e48d6c7bb9e6e6a92237e001b03d838314b068f33c94" dependencies = [ - "getrandom", + "getrandom 0.2.15", "grass_compiler", "include_sass", ] [[package]] name = "grass_compiler" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f39216c1843182f78541276fec96f88406861f16aa19cc9f8add70f8e67b7577" +checksum = "2d9e3df7f0222ce5184154973d247c591d9aadc28ce7a73c6cd31100c9facff6" dependencies = [ "codemap", "indexmap", "lasso", "once_cell", - "phf 0.11.2", + "phf 0.11.3", "rand", ] @@ -1253,7 +1347,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", "indexmap", "slab", "tokio", @@ -1262,12 +1356,22 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.13.2" +name = "h2" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ - "ahash", + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.2.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -1281,6 +1385,41 @@ dependencies = [ ] [[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "headers" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http 1.2.0", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http 1.2.0", +] + +[[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1307,6 +1446,12 @@ dependencies = [ ] [[package]] +name = "htmlescape" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163" + +[[package]] name = "http" version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1318,13 +1463,36 @@ dependencies = [ ] [[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http", + "http 1.2.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.2.0", + "http-body", "pin-project-lite", ] @@ -1336,9 +1504,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -1348,47 +1516,82 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", - "http", + "h2 0.4.7", + "http 1.2.0", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http", + "http 1.2.0", "hyper", - "rustls 0.21.12", + "hyper-util", + "rustls", + "rustls-pki-types", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.2.0", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1408,6 +1611,124 @@ dependencies = [ ] [[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1415,19 +1736,30 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "if-addrs" -version = "0.12.0" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2a33e9c38988ecbda730c85b0fd9ddcdf83c0305ac7fd21c8bb9f57f2f0cc8" +checksum = "a78a89907582615b19f6f0da1af18abf6ff08be259395669b834b057a7ee92d8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1435,9 +1767,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", @@ -1451,64 +1783,65 @@ dependencies = [ [[package]] name = "impl-more" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" +checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" [[package]] name = "include_sass" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e3449e45f573234f6d50c3addffb07dbab42b21faa1a42fe0fa6dd31e4c78" +checksum = "c6090ec145f7cf645ff53998a54d3fc77ae02d71651093ee53806769eb40ea1f" dependencies = [ "grass_compiler", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "indexmap" -version = "2.2.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1520,24 +1853,24 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lasso" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4644821e1c3d7a560fe13d842d13f587c07348a1a05d3a797152d41c90c56df2" +checksum = "6e14eda50a3494b3bf7b9ce51c52434a761e383d7238ce1dd5dcec2fbc13e9fb" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.5", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libflate" @@ -1564,10 +1897,27 @@ dependencies = [ ] [[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags", + "libc", + "redox_syscall", +] + +[[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "local-channel" @@ -1598,9 +1948,18 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.2", +] [[package]] name = "mac" @@ -1653,14 +2012,24 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", ] [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -1670,9 +2039,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1680,7 +2049,7 @@ dependencies = [ [[package]] name = "miniserve" -version = "0.27.1" +version = "0.29.0" dependencies = [ "actix-files", "actix-multipart", @@ -1698,12 +2067,12 @@ dependencies = [ "clap_mangen", "colored", "comrak", + "dav-server", "fake-tty", "fast_qr", "futures", "grass", "hex", - "http", "httparse", "if-addrs", "libflate", @@ -1717,8 +2086,9 @@ dependencies = [ "pretty_assertions", "regex", "reqwest", + "reqwest_dav", "rstest", - "rustls 0.20.9", + "rustls", "rustls-pemfile", "select", "serde", @@ -1727,7 +2097,7 @@ dependencies = [ "socket2", "strum", "tar", - "thiserror", + "thiserror 2.0.11", "tokio", "url", "zip", @@ -1735,23 +2105,23 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "log", - "wasi", - "windows-sys 0.48.0", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", ] [[package]] @@ -1764,6 +2134,23 @@ dependencies = [ ] [[package]] +name = "native-tls" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] name = "new_debug_unreachable" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1801,18 +2188,62 @@ dependencies = [ [[package]] name = "object" -version = "0.35.0" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "openssl" +version = "0.10.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] [[package]] name = "parking_lot" @@ -1832,16 +2263,16 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets", ] [[package]] name = "parse-size" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944553dd59c802559559161f9816429058b869003836120e262e8caec061b7ae" +checksum = "487f2ccd1e17ce8c1bfab3a65c89525af41cfad4c8659021a1e9a2aacd73b89b" [[package]] name = "paste" @@ -1866,12 +2297,12 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", - "phf_shared 0.11.2", + "phf_shared 0.11.3", ] [[package]] @@ -1896,25 +2327,25 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared 0.11.2", + "phf_shared 0.11.3", "rand", ] [[package]] name = "phf_macros" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", + "phf_generator 0.11.3", + "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] @@ -1923,23 +2354,43 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher 1.0.1", +] + +[[package]] +name = "pin-project" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" dependencies = [ - "siphasher", + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1949,9 +2400,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "port_check" @@ -1967,9 +2418,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -1979,9 +2433,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.1.0" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "difflib", @@ -1993,15 +2447,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -2009,9 +2463,9 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -2019,9 +2473,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ "toml_edit", ] @@ -2051,18 +2505,70 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.11", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom 0.2.15", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.11", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] name = "quote" -version = "1.0.36" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -2094,32 +2600,23 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", + "bitflags", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2129,9 +2626,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2140,15 +2637,15 @@ dependencies = [ [[package]] name = "regex-lite" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relative-path" @@ -2158,59 +2655,73 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", - "http", + "h2 0.4.7", + "http 1.2.0", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", "mime", "mime_guess", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", + "quinn", + "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls 0.24.1", + "tokio-native-tls", + "tokio-rustls", + "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.4", - "winreg", + "webpki-roots", + "windows-registry", ] [[package]] -name = "ring" -version = "0.16.20" +name = "reqwest_dav" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "ea79cbb695b7cc877ae9c0f0eeb8468e36cd03dc9c41a93bcf237396357c7b42" dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", + "async-trait", + "chrono", + "digest_auth", + "http 1.2.0", + "httpdate", + "reqwest", + "serde", + "serde-xml-rs", + "serde_derive", + "serde_json", + "tokio", + "url", ] [[package]] @@ -2221,10 +2732,10 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "spin", + "untrusted", "windows-sys 0.52.0", ] @@ -2236,27 +2747,27 @@ checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" [[package]] name = "roff" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" +checksum = "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3" [[package]] name = "rstest" -version = "0.21.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afd55a67069d6e434a95161415f5beeada95a01c7b815508a82dcb0e1593682" +checksum = "03e905296805ab93e13c1ec3a03f4b6c4f35e9498a3d5fa96dc626d22c03cd89" dependencies = [ - "futures", "futures-timer", + "futures-util", "rstest_macros", "rustc_version", ] [[package]] name = "rstest_macros" -version = "0.21.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4165dfae59a39dd41d8dec720d3cbfbc71f69744efb480a3920f5d4e0cc6798d" +checksum = "ef0053bbffce09062bee4bcc499b0fbe7a57b879f1efe088d6d8d4c7adcdef9b" dependencies = [ "cfg-if", "glob", @@ -2266,7 +2777,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.66", + "syn 2.0.98", "unicode-ident", ] @@ -2277,81 +2788,87 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.20.9" +version = "0.23.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" dependencies = [ - "log", - "ring 0.16.20", - "sct", - "webpki", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", ] [[package]] -name = "rustls" -version = "0.21.12" +name = "rustls-pemfile" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki", - "sct", + "rustls-pki-types", ] [[package]] -name = "rustls-pemfile" -version = "1.0.4" +name = "rustls-pki-types" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" dependencies = [ - "base64 0.21.7", + "web-time", ] [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "rustls-pki-types", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "same-file" @@ -2363,19 +2880,41 @@ dependencies = [ ] [[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "sct" -version = "0.7.1" +name = "security-framework" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", ] [[package]] @@ -2391,37 +2930,50 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] +name = "serde-xml-rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782" +dependencies = [ + "log", + "serde", + "thiserror 1.0.69", + "xml-rs", +] + +[[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2470,6 +3022,12 @@ dependencies = [ ] [[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] name = "signal-hook-registry" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2496,6 +3054,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2506,9 +3070,9 @@ dependencies = [ [[package]] name = "slug" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" dependencies = [ "deunicode", "wasm-bindgen", @@ -2522,9 +3086,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2532,38 +3096,37 @@ dependencies = [ [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] -name = "spin" -version = "0.9.8" +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "string_cache" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +checksum = "938d512196766101d333398efde81bc1f37b00cb42c2f8350e5df639f040bbbe" dependencies = [ "new_debug_unreachable", - "once_cell", "parking_lot", - "phf_shared 0.10.0", + "phf_shared 0.11.3", "precomputed-hash", "serde", ] [[package]] name = "string_cache_codegen" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" +checksum = "244292f3441c89febe5b5bdfbb6863aeaf4f64da810ea3050fd927b27b8d92ce" dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", + "phf_generator 0.11.3", + "phf_shared 0.11.3", "proc-macro2", "quote", ] @@ -2576,27 +3139,33 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7993a8e3a9e88a00351486baae9522c91b123a088f76469e5bd5cc17198ea87" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2609,9 +3178,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -2620,26 +3189,40 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -2647,9 +3230,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -2658,14 +3241,16 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.3.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2690,45 +3275,65 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", ] [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -2749,19 +3354,29 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] [[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -2774,9 +3389,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -2786,35 +3401,34 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "socket2", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "tokio-rustls" -version = "0.23.4" +name = "tokio-native-tls" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ - "rustls 0.20.9", + "native-tls", "tokio", - "webpki", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.21.12", + "rustls", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -2825,15 +3439,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" dependencies = [ "indexmap", "toml_datetime", @@ -2841,16 +3455,37 @@ dependencies = [ ] [[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -2859,9 +3494,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] @@ -2886,30 +3521,21 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] @@ -2922,21 +3548,15 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -2950,10 +3570,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" +dependencies = [ + "getrandom 0.3.1", +] [[package]] name = "v_htmlescape" @@ -2962,16 +3603,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" [[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ "libc", ] @@ -3002,47 +3649,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3050,105 +3708,101 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "webpki" -version = "0.22.4" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "js-sys", + "wasm-bindgen", ] [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ - "webpki", + "rustls-pki-types", ] [[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "winapi" -version = "0.3.9" +name = "winapi-util" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-sys 0.59.0", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.8" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-sys 0.52.0", + "windows-targets", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] [[package]] -name = "windows-core" -version = "0.52.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-targets 0.48.5", + "windows-result", + "windows-targets", ] [[package]] @@ -3157,154 +3811,117 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" dependencies = [ "memchr", ] [[package]] -name = "winreg" -version = "0.50.0" +name = "wit-bindgen-rt" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "bitflags", ] [[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] name = "xattr" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909" dependencies = [ "libc", "linux-raw-sys", @@ -3312,6 +3929,12 @@ dependencies = [ ] [[package]] +name = "xml-rs" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5b940ebc25896e71dd073bad2dbaa2abfe97b0a391415e22ad1326d9c54e3c4" + +[[package]] name = "xml5ever" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3323,36 +3946,119 @@ dependencies = [ ] [[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + +[[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", + "synstructure", +] [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.98", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] [[package]] name = "zip" -version = "2.1.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd56a4d5921bc2f99947ac5b3abe5f510b1be7376fdc5e9fce4a23c6a93e87c" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ "arbitrary", "crc32fast", @@ -3360,32 +4066,32 @@ dependencies = [ "displaydoc", "indexmap", "memchr", - "thiserror", + "thiserror 2.0.11", ] [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", @@ -1,6 +1,6 @@ [package] name = "miniserve" -version = "0.27.1" +version = "0.29.0" description = "For when you really just want to serve some files over HTTP right now!" authors = ["Sven-Hendrik Haase <svenstaro@gmail.com>", "Boastful Squirrel <boastful.squirrel@gmail.com>"] repository = "https://github.com/svenstaro/miniserve" @@ -20,7 +20,7 @@ strip = true [dependencies] actix-files = "0.6.5" -actix-multipart = "0.6" +actix-multipart = "0.7" actix-web = { version = "4", features = ["macros", "compress-brotli", "compress-gzip", "compress-zstd"], default-features = false } actix-web-httpauth = "0.8" alphanumeric-sort = "1" @@ -31,15 +31,15 @@ chrono-humanize = "0.2" clap = { version = "4", features = ["derive", "cargo", "wrap_help", "deprecated", "env"] } clap_complete = "4" clap_mangen = "0.2" -colored = "2" -comrak = { version = "0.24", default-features = false } +colored = "3" +comrak = { version = "0.35", default-features = false } +dav-server = { version = "0.7", features = ["actix-compat"] } fast_qr = { version = "0.12", features = ["svg"] } futures = "0.3" grass = { version = "0.13", features = ["macro"], default-features = false } hex = "0.4" -http = "0.2" httparse = "1" -if-addrs = "0.12" +if-addrs = "0.13" libflate = "2" log = "0.4" maud = "0.26" @@ -48,16 +48,16 @@ nanoid = "0.4" percent-encoding = "2" port_check = "0.2" regex = "1" -rustls = { version = "0.20", optional = true } -rustls-pemfile = { version = "1.0", optional = true } +rustls = { version = "0.23", features = ["ring"], optional = true, default-features = false } +rustls-pemfile = { version = "2", optional = true } serde = { version = "1", features = ["derive"] } sha2 = "0.10" simplelog = "0.12" socket2 = "0.5" strum = { version = "0.26", features = ["derive"] } tar = "0.4" -thiserror = "1" -tokio = { version = "1.35.1", features = ["fs"] } +thiserror = "2" +tokio = { version = "1.42.0", features = ["fs"] } zip = { version = "2", default-features = false } [features] @@ -66,7 +66,7 @@ default = ["tls"] # See also https://github.com/briansmith/ring/issues/1182 # and https://github.com/briansmith/ring/issues/562 # and https://github.com/briansmith/ring/issues/1367 -tls = ["rustls", "rustls-pemfile", "actix-web/rustls"] +tls = ["rustls", "rustls-pemfile", "actix-web/rustls-0_23"] [dev-dependencies] assert_cmd = "2" @@ -74,8 +74,9 @@ assert_fs = "1" predicates = "3" pretty_assertions = "1.2" regex = "1" -reqwest = { version = "0.11", features = ["blocking", "multipart", "rustls-tls"], default-features = false } -rstest = "0.21" +reqwest = { version = "0.12", features = ["blocking", "multipart", "rustls-tls"], default-features = false } +reqwest_dav = "0.1" +rstest = "0.24" select = "0.6" url = "2" @@ -138,94 +138,95 @@ Usage: miniserve [OPTIONS] [PATH] Arguments: [PATH] Which path to serve - + [env: MINISERVE_PATH=] Options: -v, --verbose Be verbose, includes emitting access logs - + [env: MINISERVE_VERBOSE=] --index <INDEX> The name of a directory index file to serve, like "index.html" - - Normally, when miniserve serves a directory, it creates a listing for that directory. However, if a directory - contains this file, miniserve will serve that file instead. - + + Normally, when miniserve serves a directory, it creates a listing for that directory. However, if a + directory contains this file, miniserve will serve that file instead. + [env: MINISERVE_INDEX=] --spa Activate SPA (Single Page Application) mode - - This will cause the file given by --index to be served for all non-existing file paths. In effect, this will serve - the index file whenever a 404 would otherwise occur in order to allow the SPA router to handle the request instead. - + + This will cause the file given by --index to be served for all non-existing file paths. In effect, + this will serve the index file whenever a 404 would otherwise occur in order to allow the SPA + router to handle the request instead. + [env: MINISERVE_SPA=] --pretty-urls Activate Pretty URLs mode - + This will cause the server to serve the equivalent `.html` file indicated by the path. - + `/about` will try to find `about.html` and serve it. - + [env: MINISERVE_PRETTY_URLS=] -p, --port <PORT> Port to use - + [env: MINISERVE_PORT=] [default: 8080] -i, --interfaces <INTERFACES> Interface to listen on - + [env: MINISERVE_INTERFACE=] -a, --auth <AUTH> Set authentication - + Currently supported formats: username:password, username:sha256:hash, username:sha512:hash (e.g. joe:123, joe:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3) - + [env: MINISERVE_AUTH=] --auth-file <AUTH_FILE> Read authentication values from a file - + Example file content: - + joe:123 bob:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3 bill: - + [env: MINISERVE_AUTH_FILE=] --route-prefix <ROUTE_PREFIX> Use a specific route prefix - + [env: MINISERVE_ROUTE_PREFIX=] --random-route Generate a random 6-hexdigit route - + [env: MINISERVE_RANDOM_ROUTE=] -P, --no-symlinks Hide symlinks in listing and prevent them from being followed - + [env: MINISERVE_NO_SYMLINKS=] -H, --hidden Show hidden files - + [env: MINISERVE_HIDDEN=] -S, --default-sorting-method <DEFAULT_SORTING_METHOD> Default sorting method for file list - + [env: MINISERVE_DEFAULT_SORTING_METHOD=] [default: name] @@ -236,7 +237,7 @@ Options: -O, --default-sorting-order <DEFAULT_SORTING_ORDER> Default sorting order for file list - + [env: MINISERVE_DEFAULT_SORTING_ORDER=] [default: desc] @@ -246,26 +247,30 @@ Options: -c, --color-scheme <COLOR_SCHEME> Default color scheme - + [env: MINISERVE_COLOR_SCHEME=] [default: squirrel] [possible values: squirrel, archlinux, zenburn, monokai] -d, --color-scheme-dark <COLOR_SCHEME_DARK> Default color scheme - + [env: MINISERVE_COLOR_SCHEME_DARK=] [default: archlinux] [possible values: squirrel, archlinux, zenburn, monokai] -q, --qrcode Enable QR code display - + [env: MINISERVE_QRCODE=] -u, --upload-files [<ALLOWED_UPLOAD_DIR>] Enable file uploading (and optionally specify for which directory) - + + The provided path is not a physical file system path. Instead, it's relative to the serve dir. For + instance, if the serve dir is '/home/hello', set this to '/upload' to allow uploading to + '/home/hello/upload'. When specified via environment variable, a path always needs to be specified. + [env: MINISERVE_ALLOWED_UPLOAD_DIR=] --web-upload-files-concurrency <WEB_UPLOAD_CONCURRENCY> @@ -276,95 +281,96 @@ Options: -U, --mkdir Enable creating directories - + [env: MINISERVE_MKDIR_ENABLED=] -m, --media-type <MEDIA_TYPE> Specify uploadable media types - + [env: MINISERVE_MEDIA_TYPE=] [possible values: image, audio, video] -M, --raw-media-type <MEDIA_TYPE_RAW> Directly specify the uploadable media type expression - + [env: MINISERVE_RAW_MEDIA_TYPE=] -o, --overwrite-files Enable overriding existing files during file upload - - [env: OVERWRITE_FILES=] + + [env: MINISERVE_OVERWRITE_FILES=] -r, --enable-tar Enable uncompressed tar archive generation - + [env: MINISERVE_ENABLE_TAR=] -g, --enable-tar-gz Enable gz-compressed tar archive generation - + [env: MINISERVE_ENABLE_TAR_GZ=] -z, --enable-zip Enable zip archive generation - - WARNING: Zipping large directories can result in out-of-memory exception because zip generation is done in memory - and cannot be sent on the fly - + + WARNING: Zipping large directories can result in out-of-memory exception because zip generation is + done in memory and cannot be sent on the fly + [env: MINISERVE_ENABLE_ZIP=] -C, --compress-response Compress response - - WARNING: Enabling this option may slow down transfers due to CPU overhead, so it is disabled by default. - - Only enable this option if you know that your users have slow connections or if you want to minimize your server's bandwidth usage. - + + WARNING: Enabling this option may slow down transfers due to CPU overhead, so it is disabled by + default. + + Only enable this option if you know that your users have slow connections or if you want to + minimize your server's bandwidth usage. + [env: MINISERVE_COMPRESS_RESPONSE=] -D, --dirs-first List directories first - + [env: MINISERVE_DIRS_FIRST=] -t, --title <TITLE> Shown instead of host in page title and heading - + [env: MINISERVE_TITLE=] --header <HEADER> - Inserts custom headers into the responses. Specify each header as a 'Header:Value' pair. - This parameter can be used multiple times to add multiple headers. - - Example: - --header "Header1:Value1" --header "Header2:Value2" - (If a header is already set or previously inserted, it will not be overwritten.) - + Inserts custom headers into the responses. Specify each header as a 'Header:Value' pair. This + parameter can be used multiple times to add multiple headers. + + Example: --header "Header1:Value1" --header "Header2:Value2" (If a header is already set or + previously inserted, it will not be overwritten.) + [env: MINISERVE_HEADER=] -l, --show-symlink-info Visualize symlinks in directory listing - + [env: MINISERVE_SHOW_SYMLINK_INFO=] -F, --hide-version-footer Hide version footer - + [env: MINISERVE_HIDE_VERSION_FOOTER=] --hide-theme-selector Hide theme selector - + [env: MINISERVE_HIDE_THEME_SELECTOR=] -W, --show-wget-footer If enabled, display a wget command to recursively download the current directory - + [env: MINISERVE_SHOW_WGET_FOOTER=] --print-completions <shell> Generate completion file for a shell - + [possible values: bash, elvish, fish, powershell, zsh] --print-manpage @@ -372,26 +378,34 @@ Options: --tls-cert <TLS_CERT> TLS certificate to use - + [env: MINISERVE_TLS_CERT=] --tls-key <TLS_KEY> TLS private key to use - + [env: MINISERVE_TLS_KEY=] --readme Enable README.md rendering in directories - + [env: MINISERVE_README=] -I, --disable-indexing Disable indexing - + This will prevent directory listings from being generated and return an error instead. - + [env: MINISERVE_DISABLE_INDEXING=] + --enable-webdav + Enable read-only WebDAV support (PROPFIND requests) + + Currently incompatible with -P|--no-symlinks (see + https://github.com/messense/dav-server-rs/issues/37) + + [env: MINISERVE_ENABLE_WEBDAV=] + -h, --help Print help (see a summary with '-h') @@ -479,10 +493,19 @@ In case you want to customize the particular flags that miniserve launches with, and set the `[Service]` part in the resulting `override.conf` file. For instance: [Service] + ExecStart= ExecStart=/usr/bin/miniserve --enable-tar --enable-zip --no-symlinks --verbose -i ::1 -p 1234 --title hello --color-scheme monokai --color-scheme-dark monokai -- %I -Make sure to leave the `%I` at the very end in place or the wrong path might be served. You -might additionally have to override `IPAddressAllow` and `IPAddressDeny` if you plan on making +Make sure to leave the `%I` at the very end in place or the wrong path might be served. +Alternatively, you can configure the service via environment variables: + + [Service] + Environment=MINISERVE_ENABLE_TAR=true + Environment=MINISERVE_ENABLE_ZIP=true + Environment="MINISERVE_TITLE=hello world" + ... + +You might additionally have to override `IPAddressAllow` and `IPAddressDeny` if you plan on making miniserve directly available on a public interface. ## Binding behavior diff --git a/data/style.scss b/data/style.scss index 40b53a4..dc1e585 100644 --- a/data/style.scss +++ b/data/style.scss @@ -16,7 +16,7 @@ html { body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 300; + font-weight: normal; color: var(--text_color); background: var(--background); position: relative; @@ -418,11 +418,12 @@ td.date-cell { color: var(--date_text_color); } -span.size { +span.size, span.mobile-info.history { white-space: nowrap; border-radius: 1rem; background: var(--size_background_color); padding: 0 0.25rem; + margin: 0 0.25rem; font-size: 0.7rem; color: var(--size_text_color); } @@ -431,6 +432,10 @@ span.size { display: none; } +.mobile-info a, .mobile-info a:visited { + color: var(--size_text_color); +} + th a, th a:visited, .chevron { diff --git a/src/archive.rs b/src/archive.rs index b8ba4d4..da79ef8 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -28,27 +28,27 @@ pub enum ArchiveMethod { impl ArchiveMethod { pub fn extension(self) -> String { match self { - ArchiveMethod::TarGz => "tar.gz", - ArchiveMethod::Tar => "tar", - ArchiveMethod::Zip => "zip", + Self::TarGz => "tar.gz", + Self::Tar => "tar", + Self::Zip => "zip", } .to_string() } pub fn content_type(self) -> String { match self { - ArchiveMethod::TarGz => "application/gzip", - ArchiveMethod::Tar => "application/tar", - ArchiveMethod::Zip => "application/zip", + Self::TarGz => "application/gzip", + Self::Tar => "application/tar", + Self::Zip => "application/zip", } .to_string() } pub fn is_enabled(self, tar_enabled: bool, tar_gz_enabled: bool, zip_enabled: bool) -> bool { match self { - ArchiveMethod::TarGz => tar_gz_enabled, - ArchiveMethod::Tar => tar_enabled, - ArchiveMethod::Zip => zip_enabled, + Self::TarGz => tar_gz_enabled, + Self::Tar => tar_enabled, + Self::Zip => zip_enabled, } } @@ -69,9 +69,9 @@ impl ArchiveMethod { { let dir = dir.as_ref(); match self { - ArchiveMethod::TarGz => tar_gz(dir, skip_symlinks, out), - ArchiveMethod::Tar => tar_dir(dir, skip_symlinks, out), - ArchiveMethod::Zip => zip_dir(dir, skip_symlinks, out), + Self::TarGz => tar_gz(dir, skip_symlinks, out), + Self::Tar => tar_dir(dir, skip_symlinks, out), + Self::Zip => zip_dir(dir, skip_symlinks, out), } } } diff --git a/src/args.rs b/src/args.rs index 70ad208..f117b1c 100644 --- a/src/args.rs +++ b/src/args.rs @@ -1,8 +1,8 @@ use std::net::IpAddr; use std::path::PathBuf; +use actix_web::http::header::{HeaderMap, HeaderName, HeaderValue}; use clap::{Parser, ValueEnum, ValueHint}; -use http::header::{HeaderMap, HeaderName, HeaderValue}; use crate::auth; use crate::listing::{SortingMethod, SortingOrder}; @@ -162,7 +162,7 @@ pub struct CliArgs { /// The provided path is not a physical file system path. Instead, it's relative to the serve /// dir. For instance, if the serve dir is '/home/hello', set this to '/upload' to allow /// uploading to '/home/hello/upload'. - /// When specified via environment variable, a path always needs to the specified. + /// When specified via environment variable, a path always needs to be specified. #[arg(short = 'u', long = "upload-files", value_hint = ValueHint::FilePath, num_args(0..=1), value_delimiter(','), env = "MINISERVE_ALLOWED_UPLOAD_DIR")] pub allowed_upload_dir: Option<Vec<PathBuf>>, @@ -203,7 +203,11 @@ pub struct CliArgs { pub media_type_raw: Option<String>, /// Enable overriding existing files during file upload - #[arg(short = 'o', long = "overwrite-files", env = "OVERWRITE_FILES")] + #[arg( + short = 'o', + long = "overwrite-files", + env = "MINISERVE_OVERWRITE_FILES" + )] pub overwrite_files: bool, /// Enable uncompressed tar archive generation @@ -313,6 +317,12 @@ pub struct CliArgs { /// and return an error instead. #[arg(short = 'I', long, env = "MINISERVE_DISABLE_INDEXING")] pub disable_indexing: bool, + + /// Enable read-only WebDAV support (PROPFIND requests) + /// + /// Currently incompatible with -P|--no-symlinks (see https://github.com/messense/dav-server-rs/issues/37) + #[arg(long, env = "MINISERVE_ENABLE_WEBDAV", conflicts_with = "no_symlinks")] + pub enable_webdav: bool, } /// Checks whether an interface is valid, i.e. it can be parsed into an IP address diff --git a/src/config.rs b/src/config.rs index 6e8b89e..449d2ae 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,8 +5,8 @@ use std::{ path::PathBuf, }; +use actix_web::http::header::HeaderMap; use anyhow::{anyhow, Context, Result}; -use http::HeaderMap; #[cfg(feature = "tls")] use rustls_pemfile as pemfile; @@ -152,6 +152,9 @@ pub struct MiniserveConfig { /// If enabled, indexing is disabled. pub disable_indexing: bool, + /// If enabled, respond to WebDAV requests (read-only). + pub webdav_enabled: bool, + /// If set, use provided rustls config for TLS #[cfg(feature = "tls")] pub tls_rustls_config: Option<rustls::ServerConfig>, @@ -196,13 +199,13 @@ impl MiniserveConfig { // Otherwise, we should apply route_prefix to static files. let (favicon_route, css_route) = if args.random_route { ( - format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET)), - format!("/{}", nanoid::nanoid!(10, &ROUTE_ALPHABET)), + "/__miniserve_internal/favicon.svg".into(), + "/__miniserve_internal/style.css".into(), ) } else { ( - format!("{}/{}", route_prefix, nanoid::nanoid!(10, &ROUTE_ALPHABET)), - format!("{}/{}", route_prefix, nanoid::nanoid!(10, &ROUTE_ALPHABET)), + format!("{}/{}", route_prefix, "__miniserve_internal/favicon.ico"), + format!("{}/{}", route_prefix, "__miniserve_internal/style.css"), ) }; @@ -226,24 +229,15 @@ impl MiniserveConfig { let key_file = &mut BufReader::new( File::open(&tls_key).context(format!("Couldn't access TLS key {tls_key:?}"))?, ); - let cert_chain = pemfile::certs(cert_file).context("Reading cert file")?; - let key = pemfile::read_all(key_file) + let cert_chain = pemfile::certs(cert_file) + .map(|cert| cert.expect("Invalid certificate in certificate chain")) + .collect(); + let private_key = pemfile::private_key(key_file) .context("Reading private key file")? - .into_iter() - .find_map(|item| match item { - pemfile::Item::RSAKey(key) - | pemfile::Item::PKCS8Key(key) - | pemfile::Item::ECKey(key) => Some(key), - _ => None, - }) - .ok_or_else(|| anyhow!("No supported private key in file"))?; + .expect("No private key found"); let server_config = rustls::ServerConfig::builder() - .with_safe_defaults() .with_no_client_auth() - .with_single_cert( - cert_chain.into_iter().map(rustls::Certificate).collect(), - rustls::PrivateKey(key), - )?; + .with_single_cert(cert_chain, private_key)?; Some(server_config) } else { None @@ -281,7 +275,7 @@ impl MiniserveConfig { .transpose()? .unwrap_or_default(); - Ok(MiniserveConfig { + Ok(Self { verbose: args.verbose, path: args.path.unwrap_or_else(|| PathBuf::from(".")), port, @@ -319,6 +313,7 @@ impl MiniserveConfig { show_wget_footer: args.show_wget_footer, readme: args.readme, disable_indexing: args.disable_indexing, + webdav_enabled: args.enable_webdav, tls_rustls_config: tls_rustls_server_config, compress_response: args.compress_response, }) diff --git a/src/errors.rs b/src/errors.rs index 600834b..f0e22ab 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -24,6 +24,9 @@ Please set an explicit serve path like: `miniserve /my/path`")] /// In case miniserve was invoked with --no-symlinks but the serve path is a symlink #[error("The -P|--no-symlinks option was provided but the serve path '{0}' is a symlink")] NoSymlinksOptionWithSymlinkServePath(String), + + #[error("The --enable-webdav option was provided, but the serve path '{0}' is a file")] + WebdavWithFileServePath(String), } #[derive(Debug, Error)] diff --git a/src/file_op.rs b/src/file_op.rs index 9f5902c..76a7234 100644 --- a/src/file_op.rs +++ b/src/file_op.rs @@ -61,7 +61,7 @@ async fn handle_multipart( allow_hidden_paths: bool, allow_symlinks: bool, ) -> Result<u64, RuntimeError> { - let field_name = field.name().to_string(); + let field_name = field.name().expect("No name field found").to_string(); match tokio::fs::metadata(&path).await { Err(_) => Err(RuntimeError::InsufficientPermissionsError( @@ -143,12 +143,16 @@ async fn handle_multipart( }; } - let filename = field.content_disposition().get_filename().ok_or_else(|| { - RuntimeError::ParseError( - "HTTP header".to_string(), - "Failed to retrieve the name of the file to upload".to_string(), - ) - })?; + let filename = field + .content_disposition() + .expect("No content-disposition field found") + .get_filename() + .ok_or_else(|| { + RuntimeError::ParseError( + "HTTP header".to_string(), + "Failed to retrieve the name of the file to upload".to_string(), + ) + })?; let filename_path = sanitize_path(Path::new(&filename), allow_hidden_paths) .ok_or_else(|| RuntimeError::InvalidPathError("Invalid file name to upload".to_string()))?; diff --git a/src/listing.rs b/src/listing.rs index e24b41c..d908e23 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -3,7 +3,9 @@ use std::io; use std::path::{Component, Path}; use std::time::SystemTime; -use actix_web::{dev::ServiceResponse, web::Query, HttpMessage, HttpRequest, HttpResponse}; +use actix_web::{ + dev::ServiceResponse, http::Uri, web::Query, HttpMessage, HttpRequest, HttpResponse, +}; use bytesize::ByteSize; use clap::ValueEnum; use comrak::{markdown_to_html, ComrakOptions}; @@ -17,16 +19,26 @@ use crate::auth::CurrentUser; use crate::errors::{self, RuntimeError}; use crate::renderer; -use self::percent_encode_sets::PATH_SEGMENT; +use self::percent_encode_sets::COMPONENT; /// "percent-encode sets" as defined by WHATWG specs: /// https://url.spec.whatwg.org/#percent-encoded-bytes mod percent_encode_sets { use percent_encoding::{AsciiSet, CONTROLS}; - const BASE: &AsciiSet = &CONTROLS.add(b'%'); - pub const QUERY: &AsciiSet = &BASE.add(b' ').add(b'"').add(b'#').add(b'<').add(b'>'); + pub const QUERY: &AsciiSet = &CONTROLS.add(b' ').add(b'"').add(b'#').add(b'<').add(b'>'); pub const PATH: &AsciiSet = &QUERY.add(b'?').add(b'`').add(b'{').add(b'}'); - pub const PATH_SEGMENT: &AsciiSet = &PATH.add(b'/').add(b'\\'); + pub const USERINFO: &AsciiSet = &PATH + .add(b'/') + .add(b':') + .add(b';') + .add(b'=') + .add(b'@') + .add(b'[') + .add(b'\\') + .add(b']') + .add(b'^') + .add(b'|'); + pub const COMPONENT: &AsciiSet = &USERINFO.add(b'$').add(b'%').add(b'&').add(b'+').add(b','); } /// Query parameters used by listing APIs @@ -109,7 +121,7 @@ impl Entry { last_modification_date: Option<SystemTime>, symlink_info: Option<String>, ) -> Self { - Entry { + Self { name, entry_type, link, @@ -141,7 +153,7 @@ pub struct Breadcrumb { impl Breadcrumb { fn new(name: String, link: String) -> Self { - Breadcrumb { name, link } + Self { name, link } } } @@ -173,7 +185,7 @@ pub fn directory_listing( let base = Path::new(serve_path); let random_route_abs = format!("/{}", conf.route_prefix); let abs_uri = { - let res = http::Uri::builder() + let res = Uri::builder() .scheme(req.connection_info().scheme()) .authority(req.connection_info().host()) .path_and_query(req.uri().to_string()) @@ -214,7 +226,7 @@ pub fn directory_listing( Component::Normal(s) => { name = s.to_string_lossy().to_string(); link_accumulator - .push_str(&(utf8_percent_encode(&name, PATH_SEGMENT).to_string() + "/")); + .push_str(&(utf8_percent_encode(&name, COMPONENT).to_string() + "/")); } _ => name = "".to_string(), }; @@ -253,7 +265,7 @@ pub fn directory_listing( .and_then(|path| std::fs::read_link(path).ok()) .map(|path| path.to_string_lossy().into_owned()); let file_url = base - .join(utf8_percent_encode(&file_name, PATH_SEGMENT).to_string()) + .join(utf8_percent_encode(&file_name, COMPONENT).to_string()) .to_string_lossy() .to_string(); @@ -262,10 +274,7 @@ pub fn directory_listing( if conf.no_symlinks && is_symlink { continue; } - let last_modification_date = match metadata.modified() { - Ok(date) => Some(date), - Err(_) => None, - }; + let last_modification_date = metadata.modified().ok(); if metadata.is_dir() { entries.push(Entry::new( @@ -286,7 +295,7 @@ pub fn directory_listing( symlink_dest, )); if conf.readme && readme_rx.is_match(&file_name.to_lowercase()) { - let ext = file_name.split('.').last().unwrap().to_lowercase(); + let ext = file_name.split('.').next_back().unwrap().to_lowercase(); readme = Some(( file_name.to_string(), if ext == "md" { diff --git a/src/main.rs b/src/main.rs index aa40585..ccf611c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,13 +6,18 @@ use std::time::Duration; use actix_files::NamedFile; use actix_web::{ dev::{fn_service, ServiceRequest, ServiceResponse}, - http::header::ContentType, + guard, + http::{header::ContentType, Method}, middleware, web, App, HttpRequest, HttpResponse, Responder, }; use actix_web_httpauth::middleware::HttpAuthentication; use anyhow::Result; use clap::{crate_version, CommandFactory, Parser}; use colored::*; +use dav_server::{ + actix::{DavRequest, DavResponse}, + DavConfig, DavHandler, DavMethodSet, +}; use fast_qr::QRBuilder; use log::{error, warn}; @@ -27,9 +32,11 @@ mod file_utils; mod listing; mod pipe; mod renderer; +mod webdav_fs; use crate::config::MiniserveConfig; use crate::errors::{RuntimeError, StartupError}; +use crate::webdav_fs::RestrictedFs; static STYLESHEET: &str = grass::include!("data/style.scss"); @@ -52,9 +59,8 @@ fn main() -> Result<()> { let miniserve_config = MiniserveConfig::try_from_args(args)?; - run(miniserve_config).map_err(|e| { + run(miniserve_config).inspect_err(|e| { errors::log_error_chain(e.to_string()); - e })?; Ok(()) @@ -89,6 +95,12 @@ async fn run(miniserve_config: MiniserveConfig) -> Result<(), StartupError> { )); } + if miniserve_config.webdav_enabled && miniserve_config.path.is_file() { + return Err(StartupError::WebdavWithFileServePath( + miniserve_config.path.to_string_lossy().to_string(), + )); + } + let inside_config = miniserve_config.clone(); let canon_path = miniserve_config @@ -228,7 +240,7 @@ async fn run(miniserve_config: MiniserveConfig) -> Result<(), StartupError> { #[cfg(feature = "tls")] let srv = match &miniserve_config.tls_rustls_config { - Some(tls_config) => srv.listen_rustls(listener, tls_config.clone()), + Some(tls_config) => srv.listen_rustls_0_23(listener, tls_config.clone()), None => srv.listen(listener), }; @@ -308,7 +320,9 @@ fn configure_header(conf: &MiniserveConfig) -> middleware::DefaultHeaders { /// This is where we configure the app to serve an index file, the file listing, or a single file. fn configure_app(app: &mut web::ServiceConfig, conf: &MiniserveConfig) { let dir_service = || { - let mut files = actix_files::Files::new("", &conf.path); + // use routing guard so propfind and options requests fall through to the webdav handler + let mut files = actix_files::Files::new("", &conf.path) + .guard(guard::Any(guard::Get()).or(guard::Head())); // Use specific index file if one was provided. if let Some(ref index_file) = conf.index { @@ -377,6 +391,38 @@ fn configure_app(app: &mut web::ServiceConfig, conf: &MiniserveConfig) { // Handle directories app.service(dir_service()); } + + if conf.webdav_enabled { + let fs = RestrictedFs::new(&conf.path, conf.show_hidden); + + let dav_server = DavHandler::builder() + .filesystem(fs) + .methods(DavMethodSet::WEBDAV_RO) + .hide_symlinks(conf.no_symlinks) + .strip_prefix(conf.route_prefix.to_owned()) + .build_handler(); + + app.app_data(web::Data::new(dav_server.clone())); + + app.service( + // actix requires tail segment to be named, even if unused + web::resource("/{tail}*") + .guard( + guard::Any(guard::Options()) + .or(guard::Method(Method::from_bytes(b"PROPFIND").unwrap())), + ) + .to(dav_handler), + ); + } +} + +async fn dav_handler(req: DavRequest, davhandler: web::Data<DavHandler>) -> DavResponse { + if let Some(prefix) = req.prefix() { + let config = DavConfig::new().strip_prefix(prefix); + davhandler.handle_with(config, req.request).await.into() + } else { + davhandler.handle(req.request).await.into() + } } async fn error_404(req: HttpRequest) -> Result<HttpResponse, RuntimeError> { diff --git a/src/pipe.rs b/src/pipe.rs index 51f094a..45ada8b 100644 --- a/src/pipe.rs +++ b/src/pipe.rs @@ -17,7 +17,7 @@ pub struct Pipe { impl Pipe { /// Wrap the given sender in a `Pipe`. pub fn new(destination: Sender<io::Result<Bytes>>) -> Self { - Pipe { + Self { dest: destination, bytes: BytesMut::new(), } diff --git a/src/renderer.rs b/src/renderer.rs index 9af601c..035309d 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -1,6 +1,6 @@ use std::time::SystemTime; -use actix_web::http::StatusCode; +use actix_web::http::{StatusCode, Uri}; use chrono::{DateTime, Local}; use chrono_humanize::Humanize; use clap::{crate_name, crate_version, ValueEnum}; @@ -9,7 +9,6 @@ use fast_qr::{ qr::QRCodeError, QRBuilder, }; -use http::Uri; use maud::{html, Markup, PreEscaped, DOCTYPE}; use strum::{Display, IntoEnumIterator}; @@ -118,7 +117,7 @@ pub fn page( } } } - @if conf.mkdir_enabled { + @if conf.mkdir_enabled && upload_allowed { div.toolbar_box { form id="mkdir" action=(mkdir_action) method="POST" enctype="multipart/form-data" { p { "Specify a directory name to create" } @@ -358,10 +357,10 @@ pub enum ThemeSlug { impl ThemeSlug { pub fn css(&self) -> &str { match self { - ThemeSlug::Squirrel => grass::include!("data/themes/squirrel.scss"), - ThemeSlug::Archlinux => grass::include!("data/themes/archlinux.scss"), - ThemeSlug::Zenburn => grass::include!("data/themes/zenburn.scss"), - ThemeSlug::Monokai => grass::include!("data/themes/monokai.scss"), + Self::Squirrel => grass::include!("data/themes/squirrel.scss"), + Self::Archlinux => grass::include!("data/themes/archlinux.scss"), + Self::Zenburn => grass::include!("data/themes/zenburn.scss"), + Self::Monokai => grass::include!("data/themes/monokai.scss"), } } @@ -553,7 +552,12 @@ fn entry_row( @if !raw { @if let Some(size) = entry.size { span.mobile-info.size { - (maud::display(size)) + (build_link("size", &format!("{}", size), sort_method, sort_order)) + } + } + @if let Some(modification_timer) = humanize_systemtime(entry.last_modification_date) { + span.mobile-info.history { + (build_link("date", &modification_timer, sort_method, sort_order)) } } } diff --git a/src/webdav_fs.rs b/src/webdav_fs.rs new file mode 100644 index 0000000..cf434ba --- /dev/null +++ b/src/webdav_fs.rs @@ -0,0 +1,83 @@ +//! Helper types and functions to allow configuring hidden files visibility +//! for WebDAV handlers + +use dav_server::{davpath::DavPath, fs::*, localfs::LocalFs}; +use futures::{future::ready, StreamExt, TryFutureExt}; +use std::path::{Component, Path}; + +/// A dav_server local filesystem backend that can be configured to deny access +/// to files and directories with names starting with a dot. +#[derive(Clone)] +pub struct RestrictedFs { + local: Box<LocalFs>, + show_hidden: bool, +} + +impl RestrictedFs { + /// Creates a new RestrictedFs serving the local path at "base". + /// If "show_hidden" is false, access to hidden files is prevented. + pub fn new<P: AsRef<Path>>(base: P, show_hidden: bool) -> Box<RestrictedFs> { + let local = LocalFs::new(base, false, false, false); + Box::new(RestrictedFs { local, show_hidden }) + } +} + +/// true if any normal component of path either starts with dot or can't be turned into a str +fn path_has_hidden_components(path: &DavPath) -> bool { + path.as_pathbuf().components().any(|c| match c { + Component::Normal(name) => name.to_str().is_none_or(|s| s.starts_with('.')), + _ => false, + }) +} + +impl DavFileSystem for RestrictedFs { + fn open<'a>( + &'a self, + path: &'a DavPath, + options: OpenOptions, + ) -> FsFuture<'a, Box<dyn DavFile>> { + if !path_has_hidden_components(path) || self.show_hidden { + self.local.open(path, options) + } else { + Box::pin(ready(Err(FsError::NotFound))) + } + } + + fn read_dir<'a>( + &'a self, + path: &'a DavPath, + meta: ReadDirMeta, + ) -> FsFuture<'a, FsStream<Box<dyn DavDirEntry>>> { + if self.show_hidden { + self.local.read_dir(path, meta) + } else if !path_has_hidden_components(path) { + Box::pin(self.local.read_dir(path, meta).map_ok(|stream| { + let dyn_stream: FsStream<Box<dyn DavDirEntry>> = Box::pin(stream.filter(|entry| { + ready(match entry { + Ok(ref e) => !e.name().starts_with(b"."), + _ => false, + }) + })); + dyn_stream + })) + } else { + Box::pin(ready(Err(FsError::NotFound))) + } + } + + fn metadata<'a>(&'a self, path: &'a DavPath) -> FsFuture<'a, Box<dyn DavMetaData>> { + if !path_has_hidden_components(path) || self.show_hidden { + self.local.metadata(path) + } else { + Box::pin(ready(Err(FsError::NotFound))) + } + } + + fn symlink_metadata<'a>(&'a self, path: &'a DavPath) -> FsFuture<'a, Box<dyn DavMetaData>> { + if !path_has_hidden_components(path) || self.show_hidden { + self.local.symlink_metadata(path) + } else { + Box::pin(ready(Err(FsError::NotFound))) + } + } +} diff --git a/tests/archive.rs b/tests/archive.rs index e6d0263..a8b5ed2 100644 --- a/tests/archive.rs +++ b/tests/archive.rs @@ -1,10 +1,10 @@ -mod fixtures; - -use fixtures::{server, Error, TestServer}; -use reqwest::StatusCode; +use reqwest::StatusCode; use rstest::rstest; -use select::document::Document; -use select::predicate::Text; +use select::{document::Document, predicate::Text}; + +mod fixtures; + +use crate::fixtures::{server, Error, TestServer}; #[rstest] fn archives_are_disabled(server: TestServer) -> Result<(), Error> { @@ -58,8 +58,10 @@ fn test_tar_archives(#[with(&["-g"])] server: TestServer) -> Result<(), Error> { } #[rstest] -#[case(server(&["--disable-indexing", "--enable-tar-gz", "--enable-tar", "--enable-zip"]))] -fn archives_are_disabled_when_indexing_disabled(#[case] server: TestServer) -> Result<(), Error> { +fn archives_are_disabled_when_indexing_disabled( + #[with(&["--disable-indexing", "--enable-tar-gz", "--enable-tar", "--enable-zip"])] + server: TestServer, +) -> Result<(), Error> { // Ensure the links to the archives are not present let body = reqwest::blocking::get(server.url())?; let parsed = Document::from_read(body)?; diff --git a/tests/auth.rs b/tests/auth.rs index 920f738..efa7827 100644 --- a/tests/auth.rs +++ b/tests/auth.rs @@ -1,31 +1,28 @@ -mod fixtures; - -use fixtures::{server, server_no_stderr, Error, FILES}; use pretty_assertions::assert_eq; -use reqwest::blocking::Client; -use reqwest::StatusCode; +use reqwest::{blocking::Client, StatusCode}; use rstest::rstest; -use select::document::Document; -use select::predicate::Text; - -#[rstest( - cli_auth_arg, client_username, client_password, - case("testuser:testpassword", "testuser", "testpassword"), - case( - "testuser:sha256:9f735e0df9a1ddc702bf0a1a7b83033f9f7153a00c29de82cedadc9957289b05", - "testuser", - "testpassword" - ), - case( - "testuser:sha512:e9e633097ab9ceb3e48ec3f70ee2beba41d05d5420efee5da85f97d97005727587fda33ef4ff2322088f4c79e8133cc9cd9f3512f4d3a303cbdb5bc585415a00", - "testuser", - "testpassword" - ), +use select::{document::Document, predicate::Text}; + +mod fixtures; + +use crate::fixtures::{server, Error, FILES}; + +#[rstest] +#[case("testuser:testpassword", "testuser", "testpassword")] +#[case( + "testuser:sha256:9f735e0df9a1ddc702bf0a1a7b83033f9f7153a00c29de82cedadc9957289b05", + "testuser", + "testpassword" +)] +#[case( + "testuser:sha512:e9e633097ab9ceb3e48ec3f70ee2beba41d05d5420efee5da85f97d97005727587fda33ef4ff2322088f4c79e8133cc9cd9f3512f4d3a303cbdb5bc585415a00", + "testuser", + "testpassword" )] fn auth_accepts( - cli_auth_arg: &str, - client_username: &str, - client_password: &str, + #[case] cli_auth_arg: &str, + #[case] client_username: &str, + #[case] client_password: &str, ) -> Result<(), Error> { let server = server(&["-a", cli_auth_arg]); let client = Client::new(); @@ -46,37 +43,35 @@ fn auth_accepts( Ok(()) } -#[rstest( - cli_auth_arg, client_username, client_password, - case("rightuser:rightpassword", "wronguser", "rightpassword"), - case( - "rightuser:sha256:314eee236177a721d0e58d3ca4ff01795cdcad1e8478ba8183a2e58d69c648c0", - "wronguser", - "rightpassword" - ), - case( - "rightuser:sha512:84ec4056571afeec9f5b59453305877e9a66c3f9a1d91733fde759b370c1d540b9dc58bfc88c5980ad2d020c3a8ee84f21314a180856f5a82ba29ecba29e2cab", - "wronguser", - "rightpassword" - ), - case("rightuser:rightpassword", "rightuser", "wrongpassword"), - case( - "rightuser:sha256:314eee236177a721d0e58d3ca4ff01795cdcad1e8478ba8183a2e58d69c648c0", - "rightuser", - "wrongpassword" - ), - case( - "rightuser:sha512:84ec4056571afeec9f5b59453305877e9a66c3f9a1d91733fde759b370c1d540b9dc58bfc88c5980ad2d020c3a8ee84f21314a180856f5a82ba29ecba29e2cab", - "rightuser", - "wrongpassword" - ), +#[rstest] +#[case("rightuser:rightpassword", "wronguser", "rightpassword")] +#[case( + "rightuser:sha256:314eee236177a721d0e58d3ca4ff01795cdcad1e8478ba8183a2e58d69c648c0", + "wronguser", + "rightpassword" +)] +#[case( + "rightuser:sha512:84ec4056571afeec9f5b59453305877e9a66c3f9a1d91733fde759b370c1d540b9dc58bfc88c5980ad2d020c3a8ee84f21314a180856f5a82ba29ecba29e2cab", + "wronguser", + "rightpassword" +)] +#[case("rightuser:rightpassword", "rightuser", "wrongpassword")] +#[case( + "rightuser:sha256:314eee236177a721d0e58d3ca4ff01795cdcad1e8478ba8183a2e58d69c648c0", + "rightuser", + "wrongpassword" +)] +#[case( + "rightuser:sha512:84ec4056571afeec9f5b59453305877e9a66c3f9a1d91733fde759b370c1d540b9dc58bfc88c5980ad2d020c3a8ee84f21314a180856f5a82ba29ecba29e2cab", + "rightuser", + "wrongpassword" )] fn auth_rejects( - cli_auth_arg: &str, - client_username: &str, - client_password: &str, + #[case] cli_auth_arg: &str, + #[case] client_username: &str, + #[case] client_password: &str, ) -> Result<(), Error> { - let server = server_no_stderr(&["-a", cli_auth_arg]); + let server = server(&["-a", cli_auth_arg]); let client = Client::new(); let status = client .get(server.url()) @@ -106,17 +101,17 @@ static ACCOUNTS: &[&str] = &[ // pwd5 ]; -#[rstest( - username, - password, - case("usr0", "pwd0"), - case("usr1", "pwd1"), - case("usr2", "pwd2"), - case("usr3", "pwd3"), - case("usr4", "pwd4"), - case("usr5", "pwd5") -)] -fn auth_multiple_accounts_pass(username: &str, password: &str) -> Result<(), Error> { +#[rstest] +#[case("usr0", "pwd0")] +#[case("usr1", "pwd1")] +#[case("usr2", "pwd2")] +#[case("usr3", "pwd3")] +#[case("usr4", "pwd4")] +#[case("usr5", "pwd5")] +fn auth_multiple_accounts_pass( + #[case] username: &str, + #[case] password: &str, +) -> Result<(), Error> { let server = server(ACCOUNTS); let client = Client::new(); @@ -139,7 +134,7 @@ fn auth_multiple_accounts_pass(username: &str, password: &str) -> Result<(), Err #[rstest] fn auth_multiple_accounts_wrong_username() -> Result<(), Error> { - let server = server_no_stderr(ACCOUNTS); + let server = server(ACCOUNTS); let client = Client::new(); let status = client @@ -153,18 +148,18 @@ fn auth_multiple_accounts_wrong_username() -> Result<(), Error> { Ok(()) } -#[rstest( - username, - password, - case("usr0", "pwd5"), - case("usr1", "pwd4"), - case("usr2", "pwd3"), - case("usr3", "pwd2"), - case("usr4", "pwd1"), - case("usr5", "pwd0") -)] -fn auth_multiple_accounts_wrong_password(username: &str, password: &str) -> Result<(), Error> { - let server = server_no_stderr(ACCOUNTS); +#[rstest] +#[case("usr0", "pwd5")] +#[case("usr1", "pwd4")] +#[case("usr2", "pwd3")] +#[case("usr3", "pwd2")] +#[case("usr4", "pwd1")] +#[case("usr5", "pwd0")] +fn auth_multiple_accounts_wrong_password( + #[case] username: &str, + #[case] password: &str, +) -> Result<(), Error> { + let server = server(ACCOUNTS); let client = Client::new(); let status = client diff --git a/tests/auth_file.rs b/tests/auth_file.rs index ddc9e25..5632d46 100644 --- a/tests/auth_file.rs +++ b/tests/auth_file.rs @@ -1,26 +1,20 @@ +use reqwest::{blocking::Client, StatusCode}; +use rstest::rstest; +use select::{document::Document, predicate::Text}; + mod fixtures; -use fixtures::{server, server_no_stderr, Error, FILES}; -use http::StatusCode; -use reqwest::blocking::Client; -use rstest::rstest; -use select::document::Document; -use select::predicate::Text; +use crate::fixtures::{server, Error, TestServer, FILES}; -#[rstest( - cli_auth_file_arg, - client_username, - client_password, - case("tests/data/auth1.txt", "joe", "123"), - case("tests/data/auth1.txt", "bob", "123"), - case("tests/data/auth1.txt", "bill", "") -)] +#[rstest] +#[case("joe", "123")] +#[case("bob", "123")] +#[case("bill", "")] fn auth_file_accepts( - cli_auth_file_arg: &str, - client_username: &str, - client_password: &str, + #[with(&["--auth-file", "tests/data/auth1.txt"])] server: TestServer, + #[case] client_username: &str, + #[case] client_password: &str, ) -> Result<(), Error> { - let server = server(&["--auth-file", cli_auth_file_arg]); let client = Client::new(); let response = client .get(server.url()) @@ -39,20 +33,15 @@ fn auth_file_accepts( Ok(()) } -#[rstest( - cli_auth_file_arg, - client_username, - client_password, - case("tests/data/auth1.txt", "joe", "wrongpassword"), - case("tests/data/auth1.txt", "bob", ""), - case("tests/data/auth1.txt", "nonexistentuser", "wrongpassword") -)] +#[rstest] +#[case("joe", "wrongpassword")] +#[case("bob", "")] +#[case("nonexistentuser", "wrongpassword")] fn auth_file_rejects( - cli_auth_file_arg: &str, - client_username: &str, - client_password: &str, + #[with(&["--auth-file", "tests/data/auth1.txt"])] server: TestServer, + #[case] client_username: &str, + #[case] client_password: &str, ) -> Result<(), Error> { - let server = server_no_stderr(&["--auth-file", cli_auth_file_arg]); let client = Client::new(); let status = client .get(server.url()) diff --git a/tests/bind.rs b/tests/bind.rs index 0fa914e..e6c448a 100644 --- a/tests/bind.rs +++ b/tests/bind.rs @@ -1,12 +1,14 @@ -mod fixtures; +use std::io::{BufRead, BufReader}; +use std::process::{Command, Stdio}; use assert_cmd::prelude::*; use assert_fs::fixture::TempDir; -use fixtures::{port, server, tmpdir, Error, TestServer}; use regex::Regex; use rstest::rstest; -use std::io::{BufRead, BufReader}; -use std::process::{Command, Stdio}; + +mod fixtures; + +use crate::fixtures::{port, server, tmpdir, Error, TestServer}; #[rstest] #[case(&["-i", "12.123.234.12"])] diff --git a/tests/cli.rs b/tests/cli.rs index 8ec03a8..7c53698 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -1,10 +1,12 @@ -mod fixtures; +use std::process::Command; use assert_cmd::prelude::*; use clap::{crate_name, crate_version, ValueEnum}; use clap_complete::Shell; -use fixtures::Error; -use std::process::Command; + +mod fixtures; + +use crate::fixtures::Error; #[test] /// Show help and exit. diff --git a/tests/create_directories.rs b/tests/create_directories.rs index 380c796..bd9259f 100644 --- a/tests/create_directories.rs +++ b/tests/create_directories.rs @@ -1,14 +1,13 @@ -mod fixtures; - -use fixtures::{server, Error, TestServer, DIRECTORIES}; use reqwest::blocking::{multipart, Client}; use rstest::rstest; -use select::document::Document; -use select::predicate::{Attr, Text}; -#[cfg(unix)] -use std::os::unix::fs::symlink as symlink_dir; -#[cfg(windows)] -use std::os::windows::fs::symlink_dir; +use select::{ + document::Document, + predicate::{Attr, Text}, +}; + +mod fixtures; + +use crate::fixtures::{server, Error, TestServer, DIRECTORY_SYMLINK}; /// This should work because the flags for uploading files and creating directories /// are set, and the directory name and path are valid. @@ -96,20 +95,14 @@ fn creating_directories_is_prevented(server: TestServer) -> Result<(), Error> { fn creating_directories_through_symlinks_is_prevented( #[with(&["--upload-files", "--mkdir", "--no-symlinks"])] server: TestServer, ) -> Result<(), Error> { - // Make symlinks - let symlink_directory_str = "symlink"; - let symlink_directory = server.path().join(symlink_directory_str); - let symlinked_direcotry = server.path().join(DIRECTORIES[0]); - symlink_dir(symlinked_direcotry, symlink_directory).unwrap(); - // Before attempting to create, ensure the symlink does not exist. let body = reqwest::blocking::get(server.url())?.error_for_status()?; let parsed = Document::from_read(body)?; - assert!(parsed.find(Text).all(|x| x.text() != symlink_directory_str)); + assert!(parsed.find(Text).all(|x| x.text() != DIRECTORY_SYMLINK)); // Attempt to perform directory creation. let form = multipart::Form::new(); - let part = multipart::Part::text(symlink_directory_str); + let part = multipart::Part::text(DIRECTORY_SYMLINK); let form = form.part("mkdir", part); // This should fail @@ -117,7 +110,7 @@ fn creating_directories_through_symlinks_is_prevented( .post( server .url() - .join(format!("/upload?path=/{symlink_directory_str}").as_str())? + .join(format!("/upload?path=/{DIRECTORY_SYMLINK}").as_str())? ) .multipart(form) .send()? diff --git a/tests/fixtures/mod.rs b/tests/fixtures/mod.rs index 96b8002..f2869b7 100644 --- a/tests/fixtures/mod.rs +++ b/tests/fixtures/mod.rs @@ -1,18 +1,18 @@ +use std::process::{Child, Command, Stdio}; +use std::thread::sleep; +use std::time::{Duration, Instant}; + use assert_cmd::prelude::*; use assert_fs::fixture::TempDir; use assert_fs::prelude::*; use port_check::free_local_port; use reqwest::Url; use rstest::fixture; -use std::process::{Child, Command, Stdio}; -use std::thread::sleep; -use std::time::{Duration, Instant}; /// Error type used by tests pub type Error = Box<dyn std::error::Error>; /// File names for testing purpose -#[allow(dead_code)] pub static FILES: &[&str] = &[ "test.txt", "test.html", @@ -31,25 +31,29 @@ pub static FILES: &[&str] = &[ ]; /// Hidden files for testing purpose -#[allow(dead_code)] pub static HIDDEN_FILES: &[&str] = &[".hidden_file1", ".hidden_file2"]; /// Directory names for testing purpose -#[allow(dead_code)] pub static DIRECTORIES: &[&str] = &["dira/", "dirb/", "dirc/"]; /// Hidden directories for testing purpose -#[allow(dead_code)] pub static HIDDEN_DIRECTORIES: &[&str] = &[".hidden_dir1/", ".hidden_dir2/"]; /// Name of a deeply nested file -#[allow(dead_code)] pub static DEEPLY_NESTED_FILE: &str = "very/deeply/nested/test.rs"; +/// Name of a symlink pointing to a directory +pub static DIRECTORY_SYMLINK: &str = "dir_symlink/"; + +/// Name of a symlink pointing to a file +pub static FILE_SYMLINK: &str = "file_symlink"; + +/// Name of a symlink pointing to a path that doesn't exist +pub static BROKEN_SYMLINK: &str = "broken_symlink"; + /// Test fixture which creates a temporary directory with a few files and directories inside. /// The directories also contain files. #[fixture] -#[allow(dead_code)] pub fn tmpdir() -> TempDir { let tmpdir = assert_fs::TempDir::new().expect("Couldn't create a temp dir for tests"); let mut files = FILES.to_vec(); @@ -76,12 +80,27 @@ pub fn tmpdir() -> TempDir { .child(DEEPLY_NESTED_FILE) .write_str("File in a deeply nested directory.") .expect("Couldn't write to file"); + + tmpdir + .child(DIRECTORY_SYMLINK.strip_suffix("/").unwrap()) + .symlink_to_dir(DIRECTORIES[0].strip_suffix("/").unwrap()) + .expect("Couldn't create symlink to dir"); + + tmpdir + .child(FILE_SYMLINK) + .symlink_to_file(FILES[0]) + .expect("Couldn't create symlink to file"); + + tmpdir + .child(BROKEN_SYMLINK) + .symlink_to_file("broken_symlink") + .expect("Couldn't create broken symlink"); + tmpdir } /// Get a free port. #[fixture] -#[allow(dead_code)] pub fn port() -> u16 { free_local_port().expect("Couldn't find a free local port") } @@ -89,7 +108,6 @@ pub fn port() -> u16 { /// Run miniserve as a server; Start with a temporary directory, a free port and some /// optional arguments then wait for a while for the server setup to complete. #[fixture] -#[allow(dead_code)] pub fn server<I>(#[default(&[] as &[&str])] args: I) -> TestServer where I: IntoIterator + Clone, @@ -103,35 +121,8 @@ where .arg("-p") .arg(port.to_string()) .args(args.clone()) - .stdout(Stdio::null()) - .spawn() - .expect("Couldn't run test binary"); - let is_tls = args - .into_iter() - .any(|x| x.as_ref().to_str().unwrap().contains("tls")); - - wait_for_port(port); - TestServer::new(port, tmpdir, child, is_tls) -} - -/// Same as `server()` but ignore stderr -#[fixture] -#[allow(dead_code)] -pub fn server_no_stderr<I>(#[default(&[] as &[&str])] args: I) -> TestServer -where - I: IntoIterator + Clone, - I::Item: AsRef<std::ffi::OsStr>, -{ - let port = port(); - let tmpdir = tmpdir(); - let child = Command::cargo_bin("miniserve") - .expect("Couldn't find test binary") - .arg(tmpdir.path()) - .arg("-p") - .arg(port.to_string()) - .args(args.clone()) - .stdout(Stdio::null()) - .stderr(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) .spawn() .expect("Couldn't run test binary"); let is_tls = args @@ -155,7 +146,6 @@ fn wait_for_port(port: u16) { } } -#[allow(dead_code)] pub struct TestServer { port: u16, tmpdir: TempDir, diff --git a/tests/header.rs b/tests/header.rs index 4ac38b1..443f2ba 100644 --- a/tests/header.rs +++ b/tests/header.rs @@ -1,13 +1,13 @@ +use rstest::rstest; + mod fixtures; -use fixtures::{server, Error}; -use rstest::rstest; +use crate::fixtures::{server, Error}; -#[rstest(headers, - case(vec!["x-info: 123".to_string()]), - case(vec!["x-info1: 123".to_string(), "x-info2: 345".to_string()]) -)] -fn custom_header_set(headers: Vec<String>) -> Result<(), Error> { +#[rstest] +#[case(vec!["x-info: 123".to_string()])] +#[case(vec!["x-info1: 123".to_string(), "x-info2: 345".to_string()])] +fn custom_header_set(#[case] headers: Vec<String>) -> Result<(), Error> { let server = server(headers.iter().flat_map(|h| vec!["--header", h])); let resp = reqwest::blocking::get(server.url())?; diff --git a/tests/navigation.rs b/tests/navigation.rs index 8c21beb..1bd8e81 100644 --- a/tests/navigation.rs +++ b/tests/navigation.rs @@ -1,24 +1,26 @@ -mod fixtures; -mod utils; +use std::process::{Command, Stdio}; -use fixtures::{server, Error, TestServer, DEEPLY_NESTED_FILE, DIRECTORIES}; use pretty_assertions::{assert_eq, assert_ne}; use rstest::rstest; use select::document::Document; -use std::process::{Command, Stdio}; -use utils::get_link_from_text; -use utils::get_link_hrefs_with_prefix; - -#[rstest( - input, - expected, - case("", "/"), - case("/dira", "/dira/"), - case("/dirb/", "/dirb/"), - case("/very/deeply/nested", "/very/deeply/nested/") -)] + +mod fixtures; +mod utils; + +use crate::fixtures::{server, Error, TestServer, DEEPLY_NESTED_FILE, DIRECTORIES}; +use crate::utils::{get_link_from_text, get_link_hrefs_with_prefix}; + +#[rstest] +#[case("", "/")] +#[case("/dira", "/dira/")] +#[case("/dirb/", "/dirb/")] +#[case("/very/deeply/nested", "/very/deeply/nested/")] /// Directories get a trailing slash. -fn index_gets_trailing_slash(server: TestServer, input: &str, expected: &str) -> Result<(), Error> { +fn index_gets_trailing_slash( + server: TestServer, + #[case] input: &str, + #[case] expected: &str, +) -> Result<(), Error> { let resp = reqwest::blocking::get(server.url().join(input)?)?; assert!(resp.url().as_str().ends_with(expected)); @@ -52,11 +54,11 @@ fn can_navigate_into_dirs_and_back(server: TestServer) -> Result<(), Error> { let initial_parsed = Document::from_read(initial_body)?; for &directory in DIRECTORIES { let dir_elem = get_link_from_text(&initial_parsed, directory).expect("Dir not found."); - let body = reqwest::blocking::get(&format!("{base_url}{dir_elem}"))?.error_for_status()?; + let body = reqwest::blocking::get(format!("{base_url}{dir_elem}"))?.error_for_status()?; let parsed = Document::from_read(body)?; let back_link = get_link_from_text(&parsed, "Parent directory").expect("Back link not found."); - let resp = reqwest::blocking::get(&format!("{base_url}{back_link}"))?; + let resp = reqwest::blocking::get(format!("{base_url}{back_link}"))?; // Now check that we can actually get back to the original location we came from using the // link. diff --git a/tests/qrcode.rs b/tests/qrcode.rs index 48fa8c8..6951d7a 100644 --- a/tests/qrcode.rs +++ b/tests/qrcode.rs @@ -1,14 +1,15 @@ -mod fixtures; +use std::process::{Command, Stdio}; +use std::thread::sleep; +use std::time::Duration; use assert_cmd::prelude::CommandCargoExt; use assert_fs::TempDir; -use fixtures::{port, server, tmpdir, Error, TestServer}; use rstest::rstest; -use select::document::Document; -use select::predicate::Attr; -use std::process::{Command, Stdio}; -use std::thread::sleep; -use std::time::Duration; +use select::{document::Document, predicate::Attr}; + +mod fixtures; + +use crate::fixtures::{port, server, tmpdir, Error, TestServer}; #[rstest] fn webpage_hides_qrcode_when_disabled(server: TestServer) -> Result<(), Error> { diff --git a/tests/raw.rs b/tests/raw.rs index 95100d2..051c3e3 100644 --- a/tests/raw.rs +++ b/tests/raw.rs @@ -1,30 +1,27 @@ -mod fixtures; -mod utils; - -use crate::fixtures::TestServer; -use fixtures::{server, Error}; use pretty_assertions::assert_eq; use reqwest::blocking::Client; use rstest::rstest; -use select::document::Document; -use select::predicate::Class; -use select::predicate::Name; +use select::{ + document::Document, + predicate::{Class, Name}, +}; + +mod fixtures; + +use crate::fixtures::{server, Error, TestServer}; /// The footer displays the correct wget command to download the folder recursively // This test can't test all aspects of the wget footer, // a more detailed unit test is available -#[rstest( - depth, - dir, - case(0, ""), - case(1, "dira/"), - case(2, "very/deeply/"), - case(3, "very/deeply/nested/") -)] +#[rstest] +#[case(0, "")] +#[case(1, "dira/")] +#[case(2, "very/deeply/")] +#[case(3, "very/deeply/nested/")] fn ui_displays_wget_element( - depth: u8, - dir: &str, - #[with(&["-W"])] server: TestServer, + #[case] depth: u8, + #[case] dir: &str, + #[with(&["--show-wget-footer"])] server: TestServer, ) -> Result<(), Error> { let client = Client::new(); @@ -62,16 +59,14 @@ fn ui_displays_wget_element( } /// All hrefs in raw mode are links to directories or files & directories end with ?raw=true -#[rstest( - dir, - case(""), - case("very/"), - case("very/deeply/"), - case("very/deeply/nested/") -)] +#[rstest] +#[case("")] +#[case("very/")] +#[case("very/deeply/")] +#[case("very/deeply/nested/")] fn raw_mode_links_to_directories_end_with_raw_true( - dir: &str, - #[with(&["-W"])] server: TestServer, + #[case] dir: &str, + #[with(&["--show-wget-footer"])] server: TestServer, ) -> Result<(), Error> { fn verify_a_tags(parsed: Document) { // Ensure all links end with ?raw=true or are files diff --git a/tests/readme.rs b/tests/readme.rs index c8138b4..cafff3d 100644 --- a/tests/readme.rs +++ b/tests/readme.rs @@ -1,12 +1,14 @@ -mod fixtures; +use std::fs::{remove_file, File}; +use std::io::Write; +use std::path::PathBuf; -use fixtures::{server, Error, TestServer, DIRECTORIES, FILES}; use rstest::rstest; use select::predicate::Attr; use select::{document::Document, node::Node}; -use std::fs::{remove_file, File}; -use std::io::Write; -use std::path::PathBuf; + +mod fixtures; + +use fixtures::{server, Error, TestServer, DIRECTORIES, FILES}; fn write_readme_contents(path: PathBuf, filename: &str) -> PathBuf { let readme_path = path.join(filename); @@ -67,17 +69,15 @@ fn no_readme_contents(server: TestServer) -> Result<(), Error> { } /// Show readme contents when told to if there is a readme file in the root -#[rstest( - readme_name, - case("Readme.md"), - case("readme.md"), - case("README.md"), - case("README.MD"), - case("ReAdMe.Md") -)] +#[rstest] +#[case("Readme.md")] +#[case("readme.md")] +#[case("README.md")] +#[case("README.MD")] +#[case("ReAdMe.Md")] fn show_root_readme_contents( #[with(&["--readme"])] server: TestServer, - readme_name: &str, + #[case] readme_name: &str, ) -> Result<(), Error> { let readme_path = write_readme_contents(server.path().to_path_buf(), readme_name); let body = reqwest::blocking::get(server.url())?.error_for_status()?; @@ -94,21 +94,19 @@ fn show_root_readme_contents( } /// Show readme contents when told to if there is a readme file in any of the directories -#[rstest( - readme_name, - case("Readme.md"), - case("readme.md"), - case("README.md"), - case("README.MD"), - case("ReAdMe.Md"), - case("Readme.txt"), - case("README.txt"), - case("README"), - case("ReAdMe") -)] +#[rstest] +#[case("Readme.md")] +#[case("readme.md")] +#[case("README.md")] +#[case("README.MD")] +#[case("ReAdMe.Md")] +#[case("Readme.txt")] +#[case("README.txt")] +#[case("README")] +#[case("ReAdMe")] fn show_nested_readme_contents( #[with(&["--readme"])] server: TestServer, - readme_name: &str, + #[case] readme_name: &str, ) -> Result<(), Error> { for dir in DIRECTORIES { let readme_path = write_readme_contents(server.path().join(dir), readme_name); diff --git a/tests/serve_request.rs b/tests/serve_request.rs index b7359c3..f840efd 100644 --- a/tests/serve_request.rs +++ b/tests/serve_request.rs @@ -1,23 +1,21 @@ -mod fixtures; +use std::process::{Command, Stdio}; +use std::thread::sleep; +use std::time::Duration; use assert_cmd::prelude::*; use assert_fs::fixture::TempDir; -use fixtures::{ - port, server, server_no_stderr, tmpdir, Error, TestServer, DIRECTORIES, FILES, - HIDDEN_DIRECTORIES, HIDDEN_FILES, -}; -use http::StatusCode; +use fixtures::BROKEN_SYMLINK; use regex::Regex; +use reqwest::StatusCode; use rstest::rstest; use select::{document::Document, node::Node, predicate::Attr}; -use std::process::{Command, Stdio}; -use std::thread::sleep; -use std::time::Duration; -#[cfg(unix)] -use std::os::unix::fs::{symlink as symlink_dir, symlink as symlink_file}; -#[cfg(windows)] -use std::os::windows::fs::{symlink_dir, symlink_file}; +mod fixtures; + +use crate::fixtures::{ + port, server, tmpdir, Error, TestServer, DIRECTORIES, DIRECTORY_SYMLINK, FILES, FILE_SYMLINK, + HIDDEN_DIRECTORIES, HIDDEN_FILES, +}; #[rstest] fn serves_requests_with_no_options(tmpdir: TempDir) -> Result<(), Error> { @@ -131,23 +129,10 @@ fn serves_requests_symlinks( #[case] show_symlink_info: bool, #[case] server: TestServer, ) -> Result<(), Error> { - let file = "symlink-file.html"; - let dir = "symlink-dir/"; - let broken = "symlink broken"; - - // Set up some basic symlinks: - // to dir, to file, to non-existent location - let orig = DIRECTORIES[0].strip_suffix('/').unwrap(); - let link = server.path().join(dir.strip_suffix('/').unwrap()); - symlink_dir(orig, link).expect("Couldn't create symlink"); - symlink_file(FILES[0], server.path().join(file)).expect("Couldn't create symlink"); - symlink_file("should-not-exist.xxx", server.path().join(broken)) - .expect("Couldn't create symlink"); - let body = reqwest::blocking::get(server.url())?.error_for_status()?; let parsed = Document::from_read(body)?; - for &entry in &[file, dir] { + for &entry in &[FILE_SYMLINK, DIRECTORY_SYMLINK] { let status = reqwest::blocking::get(server.url().join(entry)?)?.status(); // We expect a 404 here for when `no_symlinks` is `true`. if no_symlinks { @@ -161,6 +146,7 @@ fn serves_requests_symlinks( .next(); // If symlinks are deactivated, none should be shown in the listing. + dbg!(&node); assert_eq!(node.is_none(), no_symlinks); if node.is_some() && show_symlink_info { assert_eq!(node.unwrap().attr("class").unwrap(), "symlink"); @@ -186,7 +172,10 @@ fn serves_requests_symlinks( assert_eq!(node.unwrap().attr("class").unwrap(), "file"); } } - assert!(parsed.find(|x: &Node| x.text() == broken).next().is_none()); + assert!(parsed + .find(|x: &Node| x.text() == BROKEN_SYMLINK) + .next() + .is_none()); Ok(()) } @@ -240,8 +229,8 @@ fn serves_requests_custom_index_notice(tmpdir: TempDir, port: u16) -> Result<(), } #[rstest] -#[case(server_no_stderr(&["--index", FILES[0]]))] -#[case(server_no_stderr(&["--index", "does-not-exist.html"]))] +#[case(server(&["--index", FILES[0]]))] +#[case(server(&["--index", "does-not-exist.html"]))] fn index_fallback_to_listing(#[case] server: TestServer) -> Result<(), Error> { // If index file is not found, show directory listing instead both cases should return `Ok` reqwest::blocking::get(server.url())?.error_for_status()?; @@ -250,9 +239,9 @@ fn index_fallback_to_listing(#[case] server: TestServer) -> Result<(), Error> { } #[rstest] -#[case(server_no_stderr(&["--spa", "--index", FILES[0]]), "/")] -#[case(server_no_stderr(&["--spa", "--index", FILES[0]]), "/spa-route")] -#[case(server_no_stderr(&["--index", FILES[0]]), "/")] +#[case(server(&["--spa", "--index", FILES[0]]), "/")] +#[case(server(&["--spa", "--index", FILES[0]]), "/spa-route")] +#[case(server(&["--index", FILES[0]]), "/")] fn serve_index_instead_of_404_in_spa_mode( #[case] server: TestServer, #[case] url: &str, @@ -268,9 +257,9 @@ fn serve_index_instead_of_404_in_spa_mode( } #[rstest] -#[case(server_no_stderr(&["--pretty-urls", "--index", FILES[1]]), "/")] -#[case(server_no_stderr(&["--pretty-urls", "--index", FILES[1]]), "test.html")] -#[case(server_no_stderr(&["--pretty-urls", "--index", FILES[1]]), "test")] +#[case(server(&["--pretty-urls", "--index", FILES[1]]), "/")] +#[case(server(&["--pretty-urls", "--index", FILES[1]]), "test.html")] +#[case(server(&["--pretty-urls", "--index", FILES[1]]), "test")] fn serve_file_instead_of_404_in_pretty_urls_mode( #[case] server: TestServer, #[case] url: &str, @@ -301,9 +290,9 @@ fn serves_requests_with_route_prefix(#[case] server: TestServer) -> Result<(), E } #[rstest] -#[case(server_no_stderr(&[] as &[&str]), "/[a-f0-9]+")] -#[case(server_no_stderr(&["--random-route"]), "/[a-f0-9]+")] -#[case(server_no_stderr(&["--route-prefix", "foobar"]), "/foobar/[a-f0-9]+")] +#[case(server(&[] as &[&str]), "/__miniserve_internal/[a-z.]+")] +#[case(server(&["--random-route"]), "/__miniserve_internal/[a-z.]+")] +#[case(server(&["--route-prefix", "foobar"]), "/foobar/__miniserve_internal/[a-z.]+")] fn serves_requests_static_file_check( #[case] server: TestServer, #[case] static_file_pattern: String, diff --git a/tests/tls.rs b/tests/tls.rs index 7750c82..9cc441c 100644 --- a/tests/tls.rs +++ b/tests/tls.rs @@ -1,12 +1,13 @@ -mod fixtures; - use assert_cmd::Command; -use fixtures::{server, Error, TestServer, FILES}; use predicates::str::contains; use reqwest::blocking::ClientBuilder; use rstest::rstest; use select::{document::Document, node::Node}; +mod fixtures; + +use crate::fixtures::{server, Error, TestServer, FILES}; + /// Can start the server with TLS and receive encrypted responses. #[rstest] #[case(server(&[ diff --git a/tests/upload_files.rs b/tests/upload_files.rs index 77a9dc3..5fdf2cf 100644 --- a/tests/upload_files.rs +++ b/tests/upload_files.rs @@ -1,13 +1,15 @@ -mod fixtures; +use std::fs::create_dir_all; +use std::path::Path; use assert_fs::fixture::TempDir; -use fixtures::{server, server_no_stderr, tmpdir, Error, TestServer}; use reqwest::blocking::{multipart, Client}; use rstest::rstest; use select::document::Document; use select::predicate::{Attr, Text}; -use std::fs::create_dir_all; -use std::path::Path; + +mod fixtures; + +use crate::fixtures::{server, tmpdir, Error, TestServer}; #[rstest] fn uploading_files_works(#[with(&["-u"])] server: TestServer) -> Result<(), Error> { @@ -85,8 +87,8 @@ fn uploading_files_is_prevented(server: TestServer) -> Result<(), Error> { /// This test runs the server with --allowed-upload-dir argument and /// checks that file upload to a different directory is actually prevented. #[rstest] -#[case(server_no_stderr(&["-u", "someDir"]))] -#[case(server_no_stderr(&["-u", "someDir/some_sub_dir"]))] +#[case(server(&["-u", "someDir"]))] +#[case(server(&["-u", "someDir/some_sub_dir"]))] fn uploading_files_is_restricted(#[case] server: TestServer) -> Result<(), Error> { let test_file_name = "uploaded test file.txt"; @@ -219,7 +221,7 @@ fn prevent_path_traversal_attacks( /// See https://github.com/svenstaro/miniserve/issues/466 #[rstest] #[case(server(&["-u"]), true)] -#[case(server_no_stderr(&["-u", "--no-symlinks"]), false)] +#[case(server(&["-u", "--no-symlinks"]), false)] fn upload_to_symlink_directory( #[case] server: TestServer, #[case] ok: bool, diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs index baffc29..792b070 100644 --- a/tests/utils/mod.rs +++ b/tests/utils/mod.rs @@ -1,5 +1,3 @@ -#![allow(dead_code)] - use select::document::Document; use select::node::Node; use select::predicate::Name; @@ -26,5 +24,5 @@ pub fn get_link_hrefs_with_prefix(document: &Document, prefix: &str) -> Vec<Stri } } - return vec; + vec } diff --git a/tests/webdav.rs b/tests/webdav.rs new file mode 100644 index 0000000..09d04e9 --- /dev/null +++ b/tests/webdav.rs @@ -0,0 +1,150 @@ +use std::process::Command; + +use assert_cmd::prelude::*; +use assert_fs::TempDir; +use predicates::str::contains; +use reqwest::{blocking::Client, Method}; +use reqwest_dav::{ + list_cmd::{ListEntity, ListFile, ListFolder}, + ClientBuilder as DavClientBuilder, +}; +use rstest::rstest; + +mod fixtures; + +use crate::fixtures::{ + server, tmpdir, Error, TestServer, DIRECTORIES, DIRECTORY_SYMLINK, FILES, FILE_SYMLINK, + HIDDEN_DIRECTORIES, HIDDEN_FILES, +}; + +#[rstest] +#[case(server(&["--enable-webdav"]), true)] +#[case(server(&[] as &[&str]), false)] +fn webdav_flag_works( + #[case] server: TestServer, + #[case] should_respond: bool, +) -> Result<(), Error> { + let client = Client::new(); + let response = client + .request(Method::from_bytes(b"PROPFIND").unwrap(), server.url()) + .header("Depth", "1") + .send()?; + + assert_eq!(should_respond, response.status().is_success()); + + Ok(()) +} + +#[rstest] +fn webdav_advertised_in_options( + #[with(&["--enable-webdav"])] server: TestServer, +) -> Result<(), Error> { + let response = Client::new() + .request(Method::OPTIONS, server.url()) + .send()? + .error_for_status()?; + + let headers = response.headers(); + let allow = headers.get("allow").unwrap().to_str()?; + + assert!(allow.contains("OPTIONS") && allow.contains("PROPFIND")); + assert!(headers.get("dav").is_some()); + + Ok(()) +} + +fn list_webdav(url: url::Url, path: &str) -> Result<Vec<ListEntity>, reqwest_dav::Error> { + let client = DavClientBuilder::new().set_host(url.to_string()).build()?; + + let rt = tokio::runtime::Runtime::new().unwrap(); + + rt.block_on(async { client.list(path, reqwest_dav::Depth::Number(1)).await }) +} + +#[rstest] +#[case(server(&["--enable-webdav"]), false)] +#[case(server(&["--enable-webdav", "--hidden"]), true)] +fn webdav_respects_hidden_flag( + #[case] server: TestServer, + #[case] hidden_should_show: bool, +) -> Result<(), Error> { + let list = list_webdav(server.url(), "/")?; + + assert_eq!( + hidden_should_show, + list.iter().any(|el| + matches!(el, ListEntity::File(ListFile { href, .. }) if href.contains(HIDDEN_FILES[0])) + ) + ); + + assert_eq!( + hidden_should_show, + list.iter().any(|el| + matches!(el, ListEntity::Folder(ListFolder { href, .. }) if href.contains(HIDDEN_DIRECTORIES[0])) + ) + ); + + Ok(()) +} + +#[rstest] +#[case(server(&["--enable-webdav"]), true)] +#[should_panic] +#[case(server(&["--enable-webdav", "--no-symlinks"]), false)] +fn webdav_respects_no_symlink_flag(#[case] server: TestServer, #[case] symlinks_should_show: bool) { + let list = list_webdav(server.url(), "/").unwrap(); + + assert_eq!( + symlinks_should_show, + list.iter().any(|el| + matches!(el, ListEntity::File(ListFile { href, .. }) if href.contains(FILE_SYMLINK)) + ), + ); + + assert_eq!( + symlinks_should_show, + list.iter().any(|el| + matches!(el, ListEntity::Folder(ListFolder { href, .. }) if href.contains(DIRECTORY_SYMLINK)) + ), + ); + + let list_linked = list_webdav(server.url(), &format!("/{}", DIRECTORY_SYMLINK)); + + assert_eq!(symlinks_should_show, list_linked.is_ok()); +} + +#[rstest] +fn webdav_works_with_route_prefix( + #[with(&["--enable-webdav", "--route-prefix", "test-prefix"])] server: TestServer, +) -> Result<(), Error> { + let prefixed_list = list_webdav(server.url().join("test-prefix")?, "/")?; + + assert!( + prefixed_list.iter().any(|el| + matches!(el, ListEntity::Folder(ListFolder { href, .. }) if href.contains(DIRECTORIES[0])) + ) + ); + + let root_list = list_webdav(server.url(), "/"); + + assert!(root_list.is_err()); + + Ok(()) +} + +// timeout is used in case the binary does not exit as expected and starts waiting for requests +#[rstest] +#[timeout(std::time::Duration::from_secs(1))] +fn webdav_single_file_refuses_starting(tmpdir: TempDir) { + Command::cargo_bin("miniserve") + .unwrap() + .current_dir(tmpdir.path()) + .arg(FILES[0]) + .arg("--enable-webdav") + .assert() + .failure() + .stderr(contains(format!( + "Error: The --enable-webdav option was provided, but the serve path '{}' is a file", + FILES[0] + ))); +} |