aboutsummaryrefslogtreecommitdiffstats
path: root/src/listing.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-02-06Make clippy happySven-Hendrik Haase1-5/+2
2025-01-03Use Self where possibleadamnemecek1-2/+2
2024-09-21Add missing `|` to `USERINFO` setcyqsimon1-1/+2
2024-09-21Remove non-compliant `BASE` setcyqsimon1-2/+1
2024-09-15Make URL encoding fully WHATWG-compliantcyqsimon1-4/+14
2024-06-09Remove explicit dependency on httpSven-Hendrik Haase1-2/+4
We now use the one supplied by actix-web.
2024-03-28Bump depsSven-Hendrik Haase1-1/+0
2024-01-30move check for disable_indexingCarson McManus1-9/+8
2024-01-29Refactor errorscyqsimon1-2/+2
- Split `ContexualError` into `StartError` & `RuntimeError` - Made sure every `RuntimeError` variant has an accurate status code
2024-01-29add `--disable-indexing` cli flag to completely disable directory indexingCarson McManus1-0/+9
2024-01-13Tighter code formattingSven-Hendrik Haase1-3/+0
2024-01-13Clean up default order functionSven-Hendrik Haase1-15/+10
I removed the stringly typing as we already have enums for this that we can make use of.
2024-01-13Set default sorting order and method with argumentselandsborough1-2/+10
2023-12-11Remove header Content-Encoding when archivingWhyme Lyu1-1/+0
Content-Encoding is a representation header which kinda means "same content, presented differently to different clients" or "encoded & decoded on-the-fly, guided by content negotiation". In the case of downloading an archive, MDN docs explicitly says that (quoted from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding): > If the original media is encoded in some way (e.g. a zip file) then this > information would not be included in the Content-Encoding header. Thus this patch. Also fixes !1187.
2023-12-06Prevent illegal request path from crashing programcyqsimon1-6/+11
2023-09-05Use distinct query type for file op APIscyqsimon1-7/+6
2023-02-22Switched from using AsRef<str> to using &UriSilux1-7/+7
I honestly just switched the definition and then frantically changed small things based on rusts error messages, but it passes fmt, clippy and tests so I think it's fine. This allow a bit finer control over the URI, but is honetly a bit insignificant.
2022-12-31Fix more lintsSven-Hendrik Haase1-1/+1
2022-12-19Fix lintsSven-Hendrik Haase1-1/+1
2022-10-12Upgrade clap to v4Sven-Hendrik Haase1-1/+1
2022-09-20Tidy up some importsSven-Hendrik Haase1-3/+1
2022-09-19Add support for README.txt and README filesGaurav-Lab-PC1-5/+12
2022-09-14Fix typosKian-Meng Ang1-2/+2
Found via `codespell -L crate`.
2022-09-01Remove leftover `dbg!`cyqsimon1-1/+0
2022-09-01Fix drop-down QR codecyqsimon1-17/+9
2022-08-22Fix rustfmt complaintscyqsimon1-6/+13
2022-08-22Move QR code page style to `style.scss`cyqsimon1-15/+8
2022-08-22Use `mime` for content typecyqsimon1-1/+1
2022-08-22Switch to `qrcode` libcyqsimon1-36/+5
2022-08-14Simplify README code a bitSven-Hendrik Haase1-35/+8
2022-08-14Edit Readme struct to remove render boolGaurav1-19/+8
2022-08-14Make Readme structGaurav1-14/+47
2022-08-14Add `--readme` info and reformatGaurav1-1/+0
2022-08-14Satisfy cargo fmtGaurav1-9/+17
2022-08-14Replace `markdown` by `comrak`; Render support for nested dirsGaurav1-2/+6
* README.md will be rendered at currently visiting directory instead of just in the root. * Rendering is now done by comrak, which seems heavy but has a lot more features.
2022-08-14Add `--readme` flag to cliGaurav1-2/+2
2022-08-14Add support for readme renderingGaurav1-1/+7
2022-07-21Use `mime` for all content type declarationscyqsimon1-15/+13
2022-06-26Create directory (#781)Sheepy1-0/+1
* Add ability to make directory Frontend for making directories Fix potential security vulnerability (CWE-23) Add tests Update README.md Disallow using parent directories altogether Fix formatting Fix clippy warnings Address review comments Update README.md Change `making` to `creation` Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com> Have make directory flag require file upload flag Address review comments * Disallow uploading files and making directories through symlinks when disabled * Add test * Clippy formatting changes * Add test doc comment
2022-05-23Fix new clippy lintsSven-Hendrik Haase1-1/+1
2022-05-06Allow clippy::format_push_stringSven-Hendrik Haase1-3/+5
I think if we followed the lint the code would be less readable for no real benefit.
2022-02-05update to actix-web v4.0-rc.2Ali MJ Al-Nasrawy1-4/+3
2021-12-29Implement --route-prefix to set specific route prefixjikstra1-5/+3
2021-12-28Bump actix-web to v4.0-beta.15jikstra1-3/+3
Co-authored-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-09-02cargo fmt & cargo clippyjikstra1-1/+1
2021-09-02Fix rebasejikstra1-0/+1
2021-09-01Implement a raw rendering mode for recursive folder downloadjikstra1-0/+7
- Raw mode only displays file/folders and is more focused on computer processing - Display a banner in footer to recursively download the current folder with wget
2021-08-31extract_query_parameters(): avoid clone and simplifyAli MJ Al-Nasrawy1-15/+3
Signe-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-08-30Fix clippy::too_many_arguments and rework error ..Ali MJ Al-Nasrawy1-66/+26
... page rendering Too many arguments are moved around and many of them are already stored in MiniserveConfig. Many of these are used to render error pages. To fix this issue, it was necessary to rework error page rendering: 1. Implement `ResponseError` for `ContextualError` so that it can be returned from service handlers as is and will then be automatically logged to the console and converted into an error response. 2. At service handler level, all error responses are now rendered as plain text. 3. 'error_page_middleware' is now responsible for the rendering of the final error page from plain text reponses. Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-08-30Implement show symlink destinationDean Li1-7/+13
Add option `show_symlink_info` to represent show symlink info or not. (Default to no) Show symlink destination after symlink symbol in directory listing Resemble `ls -l` and also the short argument select for this feature is also `-l`. Basic testing is included. Related to #499