docsify
docsify copied to clipboard
Error downloading file
Bug Report
Steps to reproduce
- docsify init ./docs
- make some file
- zip doc.zip
- markdown
# Headline
> An awesome project.
<a href='doc.zip' download>download</a>
- npx docsify serve docs
- click download
- get http://localhost:3000/doc.zip
Current behaviour
When I use an tag in Markdown to download a file, clicking the link works correctly. However, when I try to download the file directly through the URL, it doesn't work correctly.
download the file directly through the URL, the Content-Length returned by HTTP is incorrect.
Expected behaviour
Other relevant information
- Docsify version:
-
[ ] Bug still occurs when all/other plugins are disabled?
-
Docsify plugins (if the bug happens when plugins enabled, please try to isolate the issue):
Hi @757566833 , thx for your report, it may similar to #1918, we gonna take a look on it.
cc @docsifyjs/reviewers Can reproduce on v4. Additionally:
- Can not reproduce on run with
python3 -m http.server 3000 - Can not reproduce on dev branch.
I can't reproduce the problem under macOS.