@@ -25,8 +25,9 @@ import (
25
25
)
26
26
27
27
const (
28
- tarMimeType = "application/x-tar"
29
- zipMimeType = "application/zip"
28
+ tarMimeType = "application/x-tar"
29
+ zipMimeType = "application/zip"
30
+ windowsZipMimeType = "application/x-zip-compressed"
30
31
31
32
HTTPFileMaxBytes = 10 * (10 << 20 )
32
33
)
@@ -48,7 +49,7 @@ func (api *API) postFile(rw http.ResponseWriter, r *http.Request) {
48
49
49
50
contentType := r .Header .Get ("Content-Type" )
50
51
switch contentType {
51
- case tarMimeType , zipMimeType :
52
+ case tarMimeType , zipMimeType , windowsZipMimeType :
52
53
default :
53
54
httpapi .Write (ctx , rw , http .StatusBadRequest , codersdk.Response {
54
55
Message : fmt .Sprintf ("Unsupported content type header %q." , contentType ),
@@ -66,7 +67,7 @@ func (api *API) postFile(rw http.ResponseWriter, r *http.Request) {
66
67
return
67
68
}
68
69
69
- if contentType == zipMimeType {
70
+ if contentType == zipMimeType || contentType == windowsZipMimeType {
70
71
zipReader , err := zip .NewReader (bytes .NewReader (data ), int64 (len (data )))
71
72
if err != nil {
72
73
httpapi .Write (ctx , rw , http .StatusBadRequest , codersdk.Response {
0 commit comments