Commit e21f6933 authored by Robert Griesemer's avatar Robert Griesemer

http: set content type for fileserver directory listings

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4815062
parent 12a5774c
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment