Closed sapphi-red closed 1 year ago
/foo%2Fbar.txt returns the same content with /foo/bar.txt. Is this intended?
/foo%2Fbar.txt
/foo/bar.txt
https://github.com/lukeed/sirv/blob/886cc962a345780cd78f8910cdcf218db2a8d955/packages/sirv/index.js#L171 This is because decodeURIComponent is used instead of decodeURI here.
decodeURIComponent
decodeURI
refs https://github.com/vitejs/vite/pull/8804
/foo%2Fbar.txt
returns the same content with/foo/bar.txt
. Is this intended?Reproduction
Reason
https://github.com/lukeed/sirv/blob/886cc962a345780cd78f8910cdcf218db2a8d955/packages/sirv/index.js#L171 This is because
decodeURIComponent
is used instead ofdecodeURI
here.refs https://github.com/vitejs/vite/pull/8804