We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e396794 commit 0d1d938Copy full SHA for 0d1d938
1 file changed
lurker/main.go
@@ -87,6 +87,12 @@ func uploadFile(path, url string) error {
87
}
88
89
req.ContentLength = size
90
+ // with the default TransferEncoding golang sends out the requests for empty files without
91
+ // the required Content-Length header this is valid, but not accepted by S3 compatible APIs
92
+ if size == 0 {
93
+ req.TransferEncoding = []string{"identity"}
94
+ }
95
+
96
client := &http.Client{}
97
98
res, err := client.Do(req)
0 commit comments