From c94e0cd0b6c9694ba3df5948a86f85303bd0226e Mon Sep 17 00:00:00 2001 From: Adam Jensen Date: Mon, 23 Apr 2018 17:13:35 -0400 Subject: [PATCH] Add creation-defer-length to supported extensions --- concat_test.go | 2 +- options_test.go | 2 +- terminate_test.go | 2 +- unrouted_handler.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/concat_test.go b/concat_test.go index e223c42..9b127ac 100644 --- a/concat_test.go +++ b/concat_test.go @@ -25,7 +25,7 @@ func TestConcat(t *testing.T) { Method: "OPTIONS", Code: http.StatusOK, ResHeader: map[string]string{ - "Tus-Extension": "creation,creation-with-upload,concatenation", + "Tus-Extension": "creation,creation-with-upload,creation-defer-length,concatenation", }, }).Run(handler, t) }) diff --git a/options_test.go b/options_test.go index 2194035..81b5170 100644 --- a/options_test.go +++ b/options_test.go @@ -20,7 +20,7 @@ func TestOptions(t *testing.T) { (&httpTest{ Method: "OPTIONS", ResHeader: map[string]string{ - "Tus-Extension": "creation,creation-with-upload", + "Tus-Extension": "creation,creation-with-upload,creation-defer-length", "Tus-Version": "1.0.0", "Tus-Resumable": "1.0.0", "Tus-Max-Size": "400", diff --git a/terminate_test.go b/terminate_test.go index 098d72c..046141e 100644 --- a/terminate_test.go +++ b/terminate_test.go @@ -24,7 +24,7 @@ func TestTerminate(t *testing.T) { Method: "OPTIONS", Code: http.StatusOK, ResHeader: map[string]string{ - "Tus-Extension": "creation,creation-with-upload,termination", + "Tus-Extension": "creation,creation-with-upload,creation-defer-length,termination", }, }).Run(handler, t) }) diff --git a/unrouted_handler.go b/unrouted_handler.go index 8376ca5..3769bdf 100644 --- a/unrouted_handler.go +++ b/unrouted_handler.go @@ -119,7 +119,7 @@ func NewUnroutedHandler(config Config) (*UnroutedHandler, error) { } // Only promote extesions using the Tus-Extension header which are implemented - extensions := "creation,creation-with-upload" + extensions := "creation,creation-with-upload,creation-defer-length" if config.StoreComposer.UsesTerminater { extensions += ",termination" }