mirror of
https://github.com/golang/go
synced 2024-11-22 02:14:40 -07:00
http: set content type for fileserver directory listings
R=bradfitz, rsc CC=golang-dev https://golang.org/cl/4815062
This commit is contained in:
parent
12a5774cde
commit
e21f69338b
@ -78,6 +78,7 @@ func isText(b []byte) bool {
|
||||
}
|
||||
|
||||
func dirList(w ResponseWriter, f File) {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
fmt.Fprintf(w, "<pre>\n")
|
||||
for {
|
||||
dirs, err := f.Readdir(100)
|
||||
|
Loading…
Reference in New Issue
Block a user