Browse Source

simplify

pull/7421/head
chrislu 1 month ago
parent
commit
96546f3fcb
  1. 7
      weed/s3api/chunked_reader_v4.go

7
weed/s3api/chunked_reader_v4.go

@ -284,14 +284,12 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
// If we're using unsigned streaming upload, there is no signature to verify at each chunk.
if cr.chunkSignature != "" {
cr.state = verifyChunk
continue
} else if cr.lastChunk {
cr.state = readTrailerChunk
continue
} else {
cr.state = readChunkHeader
continue
}
continue
case readTrailerChunk:
// When using unsigned upload, this would be the raw contents of the trailer chunk:
@ -409,11 +407,10 @@ func (cr *s3ChunkedReader) Read(buf []byte) (n int, err error) {
cr.chunkSHA256Writer.Reset()
if cr.lastChunk {
cr.state = eofChunk
continue
} else {
cr.state = readChunkHeader
continue
}
continue
case eofChunk:
return n, io.EOF
}

Loading…
Cancel
Save