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 has been archived by the owner on Jun 25, 2022. It is now read-only.
under the broken_index directory I have an index.html and an index.htm, and the same under a sub directory: broken_index/sub an index.html and an index.htm.
As http.ServeFile redirects index.html calls to the /andhttp.serveFile contains the logic to check for existence of index.html under directories if f.IsDir(), I would expect "/", "/index.html", "/sub", "/sub/index.html" to work, but they come back with different errors:
"/" redirects to "http://localhost:3000//" and ends up in too many redirect calls.
"/sub/index.html" returns an empty response:
curl http://localhost:3000/sub/index.html -v Sat Aug 31 16:44:00 2019
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 3000 (#0)
> GET /sub/index.html HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Location: ./
< Date: Sat, 31 Aug 2019 23:44:12 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
I believe the underlying cause might be related to #211.
The /index.htm and /sub/index.htm urls work (just as a sanity check for my wiring/folder naming).
The text was updated successfully, but these errors were encountered:
The disk resolver was the only one that returned directories as box
files. This modification allows http redirections of index.html to
work when working with the default disk resolver.
A test case has been added to verify http's behavior when working with
the disk resolver.
Fixgobuffalo#162Fixgobuffalo#211Fixgobuffalo#235
The disk resolver was the only one that returned directories as box
files. This modification allows http redirections of index.html to
work when working with the default disk resolver.
A test case has been added to verify http's behavior when working with
the disk resolver.
Fix#162Fix#211Fix#235
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I would expect
index.html
handling to work out of the box, but it doesn't seem that way.under the
broken_index
directory I have anindex.html
and anindex.htm
, and the same under a sub directory:broken_index/sub
anindex.html
and anindex.htm
.As
http.ServeFile
redirectsindex.html
calls to the/
andhttp.serveFile
contains the logic to check for existence ofindex.html
under directories iff.IsDir()
, I would expect "/", "/index.html", "/sub", "/sub/index.html" to work, but they come back with different errors:"/" redirects to "http://localhost:3000//" and ends up in too many redirect calls.
"/sub/index.html" returns an empty response:
I believe the underlying cause might be related to #211.
The
/index.htm
and/sub/index.htm
urls work (just as a sanity check for my wiring/folder naming).The text was updated successfully, but these errors were encountered: