You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening an empty directory with Deno.open returns a ReadableStream, which is not valid for directories. This leads to that behavior and lead also to status code 200 although it supposed to be 404.
To prevent this undesired behavior, I have implemented a guard using Deno.stat to check if the path is a file before attempting to open it.
p.s: the guard added is tested and tests are passed
May I have permission to submit a pull request with this fix?
The text was updated successfully, but these errors were encountered:
What version of Hono are you using?
4.6.9
What runtime/platform is your app running on? (with version if possible)
Deno
What steps can reproduce the bug?
when
./public/.well-known/
is an empty folderWhat is the expected behavior?
404
What do you see instead?
curl: (18) transfer closed with outstanding read data remaining
Additional information
This is a bug fix from issues #3628
Opening an empty directory with Deno.open returns a ReadableStream, which is not valid for directories. This leads to that behavior and lead also to status code 200 although it supposed to be 404.
To prevent this undesired behavior, I have implemented a guard using Deno.stat to check if the path is a file before attempting to open it.
p.s: the guard added is tested and tests are passed
May I have permission to submit a pull request with this fix?
The text was updated successfully, but these errors were encountered: