aboutsummaryrefslogtreecommitdiffstats
path: root/src/listing.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
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
2020-12-28Fix lintSven-Hendrik Haase1-4/+2
2020-10-01restore default theme cli option and add default theme dark optionLukas Stabe1-0/+6
2020-09-26move css out of html into its own routeLukas Stabe1-0/+3
2020-09-25[wip] client-side color-scheme handlingLukas Stabe1-12/+0
2020-09-24use format! instead of +Lukas Stabe1-1/+1
2020-09-24use unreachable instead of panic for unreachable caseLukas Stabe1-1/+1
2020-09-24use req.connection_info() and build breadcrumbs iterativelyLukas Stabe1-25/+36
2020-09-24add title option (#335) and breadcrumb links in headingLukas Stabe1-8/+42
2020-09-24Add embedded favicon (fixes #364)Sven-Hendrik Haase1-0/+3
2020-08-24Fix double-escaping (fixes #354)Sven-Hendrik Haase1-5/+3
2020-08-21make linter happyLukas Stabe1-2/+6
2020-08-21make name ordering case-insensitiveLukas Stabe1-23/+19
2020-08-21url-decode path in title and headingLukas Stabe1-3/+12
2020-07-21Remove unrelevant commentsequal-l21-13/+0
2020-07-21Update to actix 2 and futures 0.3equal-l21-63/+77
2020-07-20cargo fmtSven-Hendrik Haase1-9/+6
2020-07-05Add generate QR code (#330)wyhaya1-0/+23
* Add generate QR code * Add --qrcode option
2020-06-26Make clippy and cargo fmt happySven-Hendrik Haase1-1/+1
2020-05-10make sure archiving is opt-inmarawan ragab1-3/+5
2020-03-11Format everythingSven-Hendrik Haase1-6/+5
2020-03-02Ignore clippy warningDamian1-1/+1
2020-03-02Added option to disable archivesDamian1-0/+21
2019-11-22Compare paths instead of stringsboastful-squirrel1-1/+1
2019-07-25Upgrade percent-encoding to 2.0Sven-Hendrik Haase1-2/+4
2019-07-24Fix testsSven-Hendrik Haase1-13/+13
2019-07-08fix parent directorywyhaya1-2/+13
2019-06-24Add doc and commentsAlexandre Bury1-4/+13
2019-06-14Enable streaming tarball downloadAlexandre Bury1-38/+38
Also add a non-compressed tar option
2019-05-31refactor codemahdi1-2/+2
2019-05-03Return QueryParameters struct instead of tupleboastful-squirrel1-26/+24
2019-05-02Print error when parsing query parameters failboastful-squirrel1-6/+9