| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
.. when binding to wildcard addresses (:: or 0.0.0.0)
* Remove local variable `interfaces` because it is no longer used
multiple times.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
| |
Don't use `interfaces`, use `miniserve_config.interfaces` instead!
Otherwise, "0.0.0.0" is converted to "localhost"!
|
| |
|
| |
|
| |
|
|\
| |
| | |
list directory if index not found
|
| | |
|
|/
|
|
|
| |
... and rewrite {save_file, handle_multipart}
... and fix clippy warning about create_error_response() being always Ok()
|
| |
|
|\
| |
| | |
Add backslash to percent_encode_sets.PATH_SEGMENT
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Resolve symlinks on directory listing
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
For non-symlink files and directories, there is no need to call
`std::fs::metadata()` as the metadata are already obtained via
`entry.metadata()`
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This should facilitate testing because this symbol will no longer a part
of the entry text shown in html.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
This should fix most encoding problems in most cases where text files are accessed
on various locales.
|
| |/
|/|
| |
| |
| | |
This name more closely resembles its purpose. For instance, we also now
support plain tar archives which are uncompressed but archives nonetheless.
|
|\ \
| | |
| | | |
Separate tar archive and tar flags
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use following terminology:
uncompressed tarballs => `uncompressed tar archives`
compressed ones => `gz-compressed tar archives`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | | |
Fix URL percent encoding for special characters
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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'
|
| |/ /
| | |
| | |
| | | |
Use proper percent-encoding charset for each context.
|
| | |
| | |
| | |
| | |
| | |
| | | |
On mobile devices, 'display: block' is set for '.directory' class. While
this neccessary to make the whole row for directories entry clickable, it
distorts the links in breadcrumbs.
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|