Description
Bug Report
Steps to reproduce
This is my case:
- Create an encrypted file. I use EncryptPad for this with the first Lorem Ipsum paragraph in it.
- Add it to your docsify project (I add it in /static/files/lorem-ipsum.epd)
- Add a link to that file in a markdown file (I do this with
[test](/static/files/lorem-ipsum.epd ':ignore')
- Run the local server with
docsify serve .
What is current behaviour
The original file in /static/files/lorem-ipsum.epd
and the downloaded file (when clicked in the link) are not the same. In my case the original has 340 bytes and the downloaded one has 628 bytes.
The big problem is that now I can't decrypt the file anymore.
What is the expected behaviour
The expected behaviour is that both files (original one and downloaded one) should be exactly the same.
In order to test if this was a bug or not I tried a few things:
- Serve with
python -m http.server
instead ofdocsify serve .
: it loaded the docs correctly, and the downloaded file was exactly the same as the original. - Manually creating a html file with the code generated by docsify
<a href="/static/files/lorem-ipsum.epd" target="_blank" rel="noopener">test</a>
and opening it directly with the browser: it downloads the file properly. - Running with server for SSR
docsify start .
: it downloads the file properly.
So based on this, I think that the expected behaviour should be to download the file properly when running a local server. Maybe someone can tell me why this happens and that it's not a bug. I will appreciate any response.
Other relevant information
-
Bug does still occur when all/other plugins are disabled?
-
Your OS: WSL2 (Ubuntu)
-
Node.js version: 17.2.0
-
npm/yarn version: npm 8.1.4
-
Browser version: Firefox 95.0.1; Chrome 96.0.4664.110.
-
Docsify version: 4.4.3
-
Docsify plugins: None.
Please create a reproducible sandbox
Mention the docsify version in which this bug was not present (if any)
None