Add creation-defer-length to supported extensions
This commit is contained in:
parent
1ab5231643
commit
c94e0cd0b6
|
@ -25,7 +25,7 @@ func TestConcat(t *testing.T) {
|
||||||
Method: "OPTIONS",
|
Method: "OPTIONS",
|
||||||
Code: http.StatusOK,
|
Code: http.StatusOK,
|
||||||
ResHeader: map[string]string{
|
ResHeader: map[string]string{
|
||||||
"Tus-Extension": "creation,creation-with-upload,concatenation",
|
"Tus-Extension": "creation,creation-with-upload,creation-defer-length,concatenation",
|
||||||
},
|
},
|
||||||
}).Run(handler, t)
|
}).Run(handler, t)
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,7 +20,7 @@ func TestOptions(t *testing.T) {
|
||||||
(&httpTest{
|
(&httpTest{
|
||||||
Method: "OPTIONS",
|
Method: "OPTIONS",
|
||||||
ResHeader: map[string]string{
|
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-Version": "1.0.0",
|
||||||
"Tus-Resumable": "1.0.0",
|
"Tus-Resumable": "1.0.0",
|
||||||
"Tus-Max-Size": "400",
|
"Tus-Max-Size": "400",
|
||||||
|
|
|
@ -24,7 +24,7 @@ func TestTerminate(t *testing.T) {
|
||||||
Method: "OPTIONS",
|
Method: "OPTIONS",
|
||||||
Code: http.StatusOK,
|
Code: http.StatusOK,
|
||||||
ResHeader: map[string]string{
|
ResHeader: map[string]string{
|
||||||
"Tus-Extension": "creation,creation-with-upload,termination",
|
"Tus-Extension": "creation,creation-with-upload,creation-defer-length,termination",
|
||||||
},
|
},
|
||||||
}).Run(handler, t)
|
}).Run(handler, t)
|
||||||
})
|
})
|
||||||
|
|
|
@ -119,7 +119,7 @@ func NewUnroutedHandler(config Config) (*UnroutedHandler, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only promote extesions using the Tus-Extension header which are implemented
|
// 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 {
|
if config.StoreComposer.UsesTerminater {
|
||||||
extensions += ",termination"
|
extensions += ",termination"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue