Work around Go bug

This commit is contained in:
Felix Geisendörfer 2013-03-21 14:15:29 +01:00
parent e17edd2f71
commit 0e217d86d9
1 changed files with 4 additions and 0 deletions

View File

@ -121,6 +121,10 @@ func postFiles(w http.ResponseWriter, r *http.Request) {
}
func headFile(w http.ResponseWriter, r *http.Request, fileId string) {
// Work around a bug in Go that would cause HEAD responses to hang. Should be
// fixed in future release, see:
// http://code.google.com/p/go/issues/detail?id=4126
w.Header().Set("Content-Length", "0")
setFileRangeHeader(w, fileId)
}