| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
add `--disable-indexing` cli flag to completely disable directory indexing
|
| | |
|
| | |
|
|/
|
|
|
| |
- Split `ContexualError` into `StartError` & `RuntimeError`
- Made sure every `RuntimeError` variant has an accurate status code
|
| |
|
|
|
|
| |
I removed the stringly typing as we already have enums for this that we can make use of.
|
| |
|
|\
| |
| | |
Prevent illegal request path from crashing program
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
Found via `codespell -L crate`.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
I think if we followed the lint the code would be less readable for no real benefit.
|
|\ |
|
| | |
|
| | |
|
|/
|
|
| |
Co-authored-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
|
|\ |
|
| |
| |
| |
| | |
Signe-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... 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
|
| |
|