diff --git a/src/http/handler_test.go b/src/http/handler_test.go index 305ce31..57d5791 100644 --- a/src/http/handler_test.go +++ b/src/http/handler_test.go @@ -200,6 +200,30 @@ var Protocol_Core_Tests = []struct { }, }, }, + { + Description: "Overlapping Resume", + FinalLength: 11, + ExpectFileContent: "hello world", + Requests: []TestRequest{ + { + Method: "PATCH", + Headers: map[string]string{"Offset": "0"}, + Body: "hello wo", + ExpectStatusCode: http.StatusOK, + }, + { + Method: "HEAD", + ExpectStatusCode: http.StatusOK, + ExpectHeaders: map[string]string{"Offset": "8"}, + }, + { + Method: "PATCH", + Headers: map[string]string{"Offset": "5"}, + Body: " world", + ExpectStatusCode: http.StatusOK, + }, + }, + }, { Description: "Offset exceeded", FinalLength: 5,