@@ -25,8 +25,9 @@ import (
2525)
2626
2727const (
28- tarMimeType = "application/x-tar"
29- zipMimeType = "application/zip"
28+ tarMimeType = "application/x-tar"
29+ zipMimeType = "application/zip"
30+ windowsZipMimeType = "application/x-zip-compressed"
3031
3132 HTTPFileMaxBytes = 10 * (10 << 20 )
3233)
@@ -48,7 +49,7 @@ func (api *API) postFile(rw http.ResponseWriter, r *http.Request) {
4849
4950 contentType := r .Header .Get ("Content-Type" )
5051 switch contentType {
51- case tarMimeType , zipMimeType :
52+ case tarMimeType , zipMimeType , windowsZipMimeType :
5253 default :
5354 httpapi .Write (ctx , rw , http .StatusBadRequest , codersdk.Response {
5455 Message : fmt .Sprintf ("Unsupported content type header %q." , contentType ),
@@ -66,7 +67,7 @@ func (api *API) postFile(rw http.ResponseWriter, r *http.Request) {
6667 return
6768 }
6869
69- if contentType == zipMimeType {
70+ if contentType == zipMimeType || contentType == windowsZipMimeType {
7071 zipReader , err := zip .NewReader (bytes .NewReader (data ), int64 (len (data )))
7172 if err != nil {
7273 httpapi .Write (ctx , rw , http .StatusBadRequest , codersdk.Response {
0 commit comments