aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #590 from aliemjay/sanitze-pathSven-Hendrik Haase2021-09-041-12/+81
|\ | | | | file_upload.rs: sanitize path input
| * Adress review commentsAli MJ Al-Nasrawy2021-09-041-2/+39
| |
| * file_upload.rs: sanitize path inputAli MJ Al-Nasrawy2021-09-011-10/+42
| | | | | | | | Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
* | Merge pull request #537 from aliemjay/src-refactor-miscSven-Hendrik Haase2021-09-043-30/+9
|\ \ | |/ |/| [Refactor] Miscellaneous small refactors
| * Simplify custom headersAli MJ Al-Nasrawy2021-08-312-15/+6
| | | | | | | | Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
| * extract_query_parameters(): avoid clone and simplifyAli MJ Al-Nasrawy2021-08-311-15/+3
| | | | | | | | Signe-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
* | Print inverted QR codes side-by-sideAli MJ Al-Nasrawy2021-08-311-5/+15
| |
* | Address review commentsAli MJ Al-Nasrawy2021-08-311-1/+1
| |
* | Print QR code to terminalAli MJ Al-Nasrawy2021-08-311-2/+42
|/
* Use selected theme in error pageAli MJ Al-Nasrawy2021-08-301-0/+10
|
* Exclude embedded routes from authenticationAli MJ Al-Nasrawy2021-08-301-48/+30
|
* Fix clippy::too_many_arguments and rework error ..Ali MJ Al-Nasrawy2021-08-306-423/+199
| | | | | | | | | | | | | | | | | | | | | ... 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>
* Implement show symlink destinationDean Li2021-08-305-18/+43
| | | | | | | | | | | | | 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
* address review commentAli MJ Al-Nasrawy2021-08-301-8/+14
|
* order interface verticallyAli MJ Al-Nasrawy2021-08-301-3/+3
|
* add comment to create_tcp_listenerAli MJ Al-Nasrawy2021-08-301-0/+4
|
* Use exit codes for failureAli MJ Al-Nasrawy2021-08-301-4/+5
|
* Show IP addresses of all local interfacesAli MJ Al-Nasrawy2021-08-301-48/+43
| | | | | | | .. when binding to wildcard addresses (:: or 0.0.0.0) * Remove local variable `interfaces` because it is no longer used multiple times.
* Fix default binding behaviourAli MJ Al-Nasrawy2021-08-301-5/+22
| | | | | | | | | | | | On some platforms, binding to to both "::" and "0.0.0.0" at the same time is not allowed because "::" may already accepts ipv4 connections. For other platforms, binding to both is necessary to support ipv4 and ipv6. This platform-specific behaviour is due to the variation in the default value for the socket option "IPV6_ONLY". Fix this by always setting the "IPv6_ONLY" sockopt to true!
* Fix -i 0.0.0.0Ali MJ Al-Nasrawy2021-08-301-23/+4
| | | | | Don't use `interfaces`, use `miniserve_config.interfaces` instead! Otherwise, "0.0.0.0" is converted to "localhost"!
* Fail if any address fails to bindAli MJ Al-Nasrawy2021-08-301-18/+13
|
* Switch from structopt to clap v3Sven-Hendrik Haase2021-08-303-39/+61
|
* Fix some warnings when building without TLSSven-Hendrik Haase2021-08-291-3/+5
|
* Merge pull request #583 from aliemjay/index-fallbackSven-Hendrik Haase2021-08-291-18/+18
|\ | | | | list directory if index not found
| * list directory if index not foundAli MJ Al-Nasrawy2021-08-291-18/+18
| |
* | file_upload.rs: use async/awaitAli MJ Al-Nasrawy2021-08-282-135/+102
|/ | | | | ... and rewrite {save_file, handle_multipart} ... and fix clippy warning about create_error_response() being always Ok()
* migrate to actix-web v4.0-betaAli MJ Al-Nasrawy2021-08-285-61/+75
|
* Merge pull request #578 from Jikstra/fix_percent_encdoing_backslashSven-Hendrik Haase2021-08-281-1/+1
|\ | | | | Add backslash to percent_encode_sets.PATH_SEGMENT
| * Add backslash to percent_encode_sets.PATH_SEGMENT. Fixes #545jikstra2021-08-271-1/+1
| |
* | Switch TLS conditional compilation to featureSven-Hendrik Haase2021-08-283-54/+9
| |
* | Conditionally enable TLS only on supported platformsSven-Hendrik Haase2021-08-273-0/+66
|/
* Fix accidental formattingSven-Hendrik Haase2021-08-271-74/+74
|
* Add TLS support via rustls (fixes #18)Sven-Hendrik Haase2021-08-273-232/+292
|
* Upgrade qrcodegen (fixes #568)Sven-Hendrik Haase2021-08-251-2/+33
|
* Fix lintsSven-Hendrik Haase2021-06-282-4/+4
|
* Merge pull request #479 from aliemjay/rfc-resolve-symlinksSven-Hendrik Haase2021-04-182-24/+24
|\ | | | | Resolve symlinks on directory listing
| * Merge branch 'master' into rfc-resolve-symlinksAli MJ Al-Nasrawy2021-04-187-162/+221
| |\
| * | Avoid unneccessary syscalls for entry metadataAli MJ Al-Nasrawy2021-04-051-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()`
| * | Honor --no-symlinks option when listingAli MJ Al-Nasrawy2021-04-051-1/+1
| | |
| * | Move symlink symbol from html to cssAli MJ Al-Nasrawy2021-03-291-2/+2
| | | | | | | | | | | | | | | This should facilitate testing because this symbol will no longer a part of the entry text shown in html.
| * | Bring back the symlink symbolAli MJ Al-Nasrawy2021-03-272-0/+17
| | |
| * | Resolve symlinks when listingAli MJ Al-Nasrawy2021-03-272-23/+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.
* | | Prefer UTF8 for text reponses (fixes #263)Sven-Hendrik Haase2021-04-181-0/+1
| | | | | | | | | | | | | | | This should fix most encoding problems in most cases where text files are accessed on various locales.
* | | Rename compression code references to 'archive'Sven-Hendrik Haase2021-04-183-35/+35
| |/ |/| | | | | | | This name more closely resembles its purpose. For instance, we also now support plain tar archives which are uncompressed but archives nonetheless.
* | Merge pull request #492 from deantvv/tar-and-tar-archiveSven-Hendrik Haase2021-04-185-7/+20
|\ \ | | | | | | Separate tar archive and tar flags
| * | Change naming of uncompressed/compressed tarballsDean Li2021-04-185-23/+18
| | | | | | | | | | | | | | | | | | Use following terminology: uncompressed tarballs => `uncompressed tar archives` compressed ones => `gz-compressed tar archives`
| * | Separate tar archive and tar flagsDean Li2021-04-115-7/+25
| | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #485 from aliemjay/percent-encodeSven-Hendrik Haase2021-04-181-9/+17
|\ \ \ | | | | | | | | Fix URL percent encoding for special characters
| * | | Avoid double-encoding file URLAli MJ Al-Nasrawy2021-04-081-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'
| * | | Fix percent encoding for URLAli MJ Al-Nasrawy2021-04-061-5/+14
| |/ / | | | | | | | | | Use proper percent-encoding charset for each context.