Set mime-type for wasm files.

Bug: skia:
Change-Id: Id12b30ffbb7c6528c4b89c2b36dfad93dabda28c
Reviewed-on: https://skia-review.googlesource.com/c/182540
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/skottie/go/skottie/main.go b/skottie/go/skottie/main.go
index 9ff5d6d..5ccfe7a 100644
--- a/skottie/go/skottie/main.go
+++ b/skottie/go/skottie/main.go
@@ -9,6 +9,7 @@
 	"fmt"
 	"html/template"
 	"io"
+	"mime"
 	"net/http"
 	"path/filepath"
 	"runtime"
@@ -59,6 +60,11 @@
 		*resourcesDir = filepath.Join(filepath.Dir(filename), "../../dist")
 	}
 
+	// Need to set the mime-type for wasm files so streaming compile works.
+	if err := mime.AddExtensionType(".wasm", "application/wasm"); err != nil {
+		sklog.Fatal(err)
+	}
+
 	ts, err := auth.NewDefaultTokenSource(*local, storage.ScopeFullControl)
 	if err != nil {
 		return nil, fmt.Errorf("Failed to get token source: %s", err)