diff --git a/pkg/handler/get_test.go b/pkg/handler/get_test.go index d69ff3f..b1d638a 100644 --- a/pkg/handler/get_test.go +++ b/pkg/handler/get_test.go @@ -143,7 +143,7 @@ func TestGet(t *testing.T) { upload.EXPECT().GetInfo(context.Background()).Return(FileInfo{ Offset: 0, MetaData: map[string]string{ - "filetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "filetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document.v1", "filename": "invoice.docx", }, }, nil), @@ -158,7 +158,7 @@ func TestGet(t *testing.T) { URL: "yes", ResHeader: map[string]string{ "Content-Length": "0", - "Content-Type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "Content-Type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document.v1", "Content-Disposition": `attachment;filename="invoice.docx"`, }, Code: http.StatusNoContent, diff --git a/pkg/handler/unrouted_handler.go b/pkg/handler/unrouted_handler.go index b90cd67..c8db15e 100644 --- a/pkg/handler/unrouted_handler.go +++ b/pkg/handler/unrouted_handler.go @@ -23,7 +23,7 @@ var ( reExtractFileID = regexp.MustCompile(`([^/]+)\/?$`) reForwardedHost = regexp.MustCompile(`host=([^,]+)`) reForwardedProto = regexp.MustCompile(`proto=(https?)`) - reMimeType = regexp.MustCompile(`^[a-z]+\/[a-z\-\+\.]+$`) + reMimeType = regexp.MustCompile(`^[a-z]+\/[a-z0-9\-\+\.]+$`) ) // HTTPError represents an error with an additional status code attached