diff --git a/concat_test.go b/concat_test.go index 4f522fb..30b1a7b 100644 --- a/concat_test.go +++ b/concat_test.go @@ -69,7 +69,7 @@ func TestConcatPartial(t *testing.T) { ReqHeader: map[string]string{ "Tus-Resumable": "1.0.0", }, - Code: http.StatusNoContent, + Code: http.StatusOK, ResHeader: map[string]string{ "Upload-Concat": "partial", }, @@ -165,7 +165,7 @@ func TestConcatFinal(t *testing.T) { ReqHeader: map[string]string{ "Tus-Resumable": "1.0.0", }, - Code: http.StatusNoContent, + Code: http.StatusOK, ResHeader: map[string]string{ "Upload-Concat": "final; http://tus.io/files/a http://tus.io/files/b", "Upload-Length": "10", diff --git a/head_test.go b/head_test.go index 9b63b59..90c5554 100644 --- a/head_test.go +++ b/head_test.go @@ -40,7 +40,7 @@ func TestHead(t *testing.T) { ReqHeader: map[string]string{ "Tus-Resumable": "1.0.0", }, - Code: http.StatusNoContent, + Code: http.StatusOK, ResHeader: map[string]string{ "Upload-Offset": "11", "Upload-Length": "44", diff --git a/unrouted_handler.go b/unrouted_handler.go index 4610760..ef7d8ea 100644 --- a/unrouted_handler.go +++ b/unrouted_handler.go @@ -313,7 +313,7 @@ func (handler *UnroutedHandler) HeadFile(w http.ResponseWriter, r *http.Request) w.Header().Set("Cache-Control", "no-store") w.Header().Set("Upload-Length", strconv.FormatInt(info.Size, 10)) w.Header().Set("Upload-Offset", strconv.FormatInt(info.Offset, 10)) - w.WriteHeader(http.StatusNoContent) + w.WriteHeader(http.StatusOK) } // PatchFile adds a chunk to an upload. Only allowed enough space is left.