From 0e217d86d9f893240db7e13fbecc769b58fdced6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisendo=CC=88rfer?= Date: Thu, 21 Mar 2013 14:15:29 +0100 Subject: [PATCH] Work around Go bug --- src/cmd/tusd/http.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/tusd/http.go b/src/cmd/tusd/http.go index 8d02b9c..67795e2 100644 --- a/src/cmd/tusd/http.go +++ b/src/cmd/tusd/http.go @@ -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) }