Skip to content

Commit 1b3c818

Browse files
earthboundkidbep
authored andcommitted
Content Type: Ignore short peek caused by EOF
If you have a file with unknown extension that is less than 512 bytes, you get a spurious error.
1 parent 18f75b9 commit 1b3c818

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/deployer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func (d *Deployer) upload(source file, destBucket *s3.Bucket) error {
419419
if contentType == "" {
420420
const magicSize = 512 // Size that DetectContentType expects
421421
peek, err := br.Peek(magicSize)
422-
if err != nil {
422+
if err != nil && err != io.EOF {
423423
return err
424424
}
425425

0 commit comments

Comments
 (0)