added Content-Length header for GET requests
This commit is contained in:
parent
a4cb2922fa
commit
7e25c34766
1
main.go
1
main.go
@ -69,6 +69,7 @@ func get(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Content-Type", getMimetype(path))
|
||||
w.Header().Add("File-Permissions", fi.Mode().Perm().String())
|
||||
w.Header().Add("Modified-Time", fi.ModTime().String())
|
||||
w.Header().Add("Content-Length", strconv.FormatInt(fi.Size(), 10))
|
||||
|
||||
username, groupname, err := getOwnerNames(getOwnerIDs(fi))
|
||||
if err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user