Ver código fonte

Add support for alternative xmlns

Used on Google's storage under https://storage.googleapis.com/bucket/
master
JustAnotherArchivist 3 anos atrás
pai
commit
41c2a9d2d4
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      s3-bucket-list

+ 1
- 1
s3-bucket-list Ver arquivo

@@ -69,7 +69,7 @@ while True:
break
attempt += 1
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]}...')

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


Carregando…
Cancelar
Salvar