Added support for multipart upload confirmation with unquoted etags
This commit is contained in:
parent
bb6da93891
commit
f8fdd439ad
2 changed files with 28 additions and 2 deletions
|
|
@ -175,11 +175,14 @@ class FakeMultipart(BaseModel):
|
|||
count = 0
|
||||
for pn, etag in body:
|
||||
part = self.parts.get(pn)
|
||||
if part is None or part.etag != etag:
|
||||
part_etag = None
|
||||
if part is not None:
|
||||
part_etag = part.etag.replace('"', '')
|
||||
etag = etag.replace('"', '')
|
||||
if part is None or part_etag != etag:
|
||||
raise InvalidPart()
|
||||
if last is not None and len(last.value) < UPLOAD_PART_MIN_SIZE:
|
||||
raise EntityTooSmall()
|
||||
part_etag = part.etag.replace('"', '')
|
||||
md5s.extend(decode_hex(part_etag)[0])
|
||||
total.extend(part.value)
|
||||
last = part
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue