Browse Source

Add support for alternative xmlns

Used on Google's storage under https://storage.googleapis.com/bucket/
master
JustAnotherArchivist 3 years ago
parent
commit
41c2a9d2d4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      s3-bucket-list

+ 1
- 1
s3-bucket-list View File

@@ -69,7 +69,7 @@ while True:
break break
attempt += 1 attempt += 1
continue continue
if not body.startswith(b'<?xml version="1.0" encoding="UTF-8"?>\n<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">'):
if not body.startswith(b'<?xml version="1.0" encoding="UTF-8"?>\n<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">') and not body.startswith(b"<?xml version='1.0' encoding='UTF-8'?><ListBucketResult xmlns='http://doc.s3.amazonaws.com/2006-03-01'>"):
raise RuntimeError(f'Invalid body: {body[:200]}...') raise RuntimeError(f'Invalid body: {body[:200]}...')


if b'<Marker></Marker>' in body[:200] and 'marker' in params: if b'<Marker></Marker>' in body[:200] and 'marker' in params:


Loading…
Cancel
Save