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
{{ message }}
This repository was archived by the owner on May 28, 2022. It is now read-only.
If make_index detects that the browser left off the final "index.html", for example when requesting "http://MYHOST:4000/MYCRATE", it will append "/index.html" when it looks for the file on disk. The returned response's body will look correct. However, all relative links will be formatted wrong. If the user clicks on one, he'll be directed to a nonexistent URL. For example:
If I browse to http://MYHOST:4000/nix, I'll see the familiar doc index for the nix crate
But if I click on a href="fcntl/index.html link, the browser actually interprets it as http://MYHOST:4000/fcntl/index.html, which does not exist.
The correct solution, when the user requests a directory URI instead of a file, would be to return a 302 redirect pointing to the index.html file.
If
make_indexdetects that the browser left off the final "index.html", for example when requesting "http://MYHOST:4000/MYCRATE", it will append "/index.html" when it looks for the file on disk. The returned response's body will look correct. However, all relative links will be formatted wrong. If the user clicks on one, he'll be directed to a nonexistent URL. For example:http://MYHOST:4000/nix, I'll see the familiar doc index for the nix cratehref="fcntl/index.htmllink, the browser actually interprets it ashttp://MYHOST:4000/fcntl/index.html, which does not exist.The correct solution, when the user requests a directory URI instead of a file, would be to return a 302 redirect pointing to the index.html file.