aboutsummaryrefslogtreecommitdiffstats
path: root/src/listing.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
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
2021-08-28migrate to actix-web v4.0-betaAli MJ Al-Nasrawy1-23/+8
2021-08-27Add backslash to percent_encode_sets.PATH_SEGMENT. Fixes #545jikstra1-1/+1
2021-08-25Upgrade qrcodegen (fixes #568)Sven-Hendrik Haase1-2/+33
2021-04-18Rename compression code references to 'archive'Sven-Hendrik Haase1-9/+9
This name more closely resembles its purpose. For instance, we also now support plain tar archives which are uncompressed but archives nonetheless.
2021-04-18Change naming of uncompressed/compressed tarballsDean Li1-3/+3
Use following terminology: uncompressed tarballs => `uncompressed tar archives` compressed ones => `gz-compressed tar archives`
2021-04-11Separate tar archive and tar flagsDean Li1-1/+3
It used to have one flag (-r) to enable both tar archive and tar. Now it has two flags [ -r: for tar, -g: for tar archive]. Related to #451
2021-04-08Avoid double-encoding file URLAli MJ Al-Nasrawy1-6/+5
Now that the '%' char itself is accepted in the file name and is encoded into '%25', this exposed a previously silent bug: `base` is already percent-encoded but it is encoded again when setting `file_url`. This produces erroneous URLs such as: '/%2523/x.y' instead of '/%23/x.y' for the path '/#/x.y'
2021-04-06Fix percent encoding for URLAli MJ Al-Nasrawy1-5/+14
Use proper percent-encoding charset for each context.
2021-04-05Avoid unneccessary syscalls for entry metadataAli MJ Al-Nasrawy1-4/+7
For non-symlink files and directories, there is no need to call `std::fs::metadata()` as the metadata are already obtained via `entry.metadata()`
2021-04-05Honor --no-symlinks option when listingAli MJ Al-Nasrawy1-1/+1
2021-03-27Bring back the symlink symbolAli MJ Al-Nasrawy1-0/+11
2021-03-27Resolve symlinks when listingAli MJ Al-Nasrawy1-19/+3
This has the benefit of showing the size and modification date of the pointed-to file. Symlink to directories now respects '--dirs-first' option and broken symlinks don't show in directory listing.
2021-03-07Add option to show hidden filesSven-Hendrik Haase1-1/+2
2021-03-07Fix DoS issue when deliberately sending unconforming URL pathsSven-Hendrik Haase1-1/+1
2021-02-28Add program version footerTamas Levai1-0/+3
2021-01-04Add option to list directories firstTamas Levai1-0/+6