Add creation-defer-length to supported extensions

This commit is contained in:
Adam Jensen 2018-04-23 17:13:35 -04:00
parent 1ab5231643
commit c94e0cd0b6
4 changed files with 4 additions and 4 deletions

View File

@ -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)
})

View File

@ -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",

View File

@ -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)
})

View File

@ -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"
}