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
andybons
changed the title
x/website: Unable to use index.html file as default for website directory.
x/website: unable to use index.html file as default for website directory.
Aug 10, 2020
dmitshur
changed the title
x/website: unable to use index.html file as default for website directory.
x/website: unable to use custom path without trailing slash ("/") in an HTML file, if it is named index.html
Aug 10, 2020
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Aug 10, 2020
The redirect to drop index.html must be done using r.URL.Path,
not relpath, because those might differ. Cutting len("index.html")
bytes off a string that doesn't end in index.html is incorrect.
While we're here, silence an annoying log print during go test.
For golang/go#40665.
Change-Id: I36553b041f53eab9c42da6b77184e90800a97e92
Reviewed-on: https://go-review.googlesource.com/c/tools/+/251080
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
var files = []string{ ... }
:What did you expect to see?
The index page I created loads when I visit the directory in a browser.
What did you see instead?
The panic above.
The text was updated successfully, but these errors were encountered: