From dbd0a957b5579a339db93d49135354b1945a5e47 Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 3 Mar 2018 21:56:46 +0100 Subject: [PATCH] Allow plus sign in MIME types For example, image/svg+xml --- unrouted_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unrouted_handler.go b/unrouted_handler.go index d36d73d..dde4eb3 100644 --- a/unrouted_handler.go +++ b/unrouted_handler.go @@ -19,7 +19,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-z\-\+]+$`) ) // HTTPError represents an error with an additional status code attached