zs3
zs3 copied to clipboard
XML binding fails on (all-keys bucket)
Having checked the XML returned by the request I found that Contents/Owner/DisplayName was missing (this is with Amazon S3). Making that optional in defbinder list-bucket-result fixed the problem.
(defbinder list-bucket-result
("ListBucketResult"
("Name" (bind :bucket-name))
("Prefix" (bind :prefix))
("Marker" (bind :marker))
(optional
("NextMarker" (bind :next-marker)))
("MaxKeys" (bind :max-keys))
(optional
("Delimiter" (bind :delimiter)))
("IsTruncated" (bind :truncatedp))
(sequence :keys
("Contents"
("Key" (bind :key))
("LastModified" (bind :last-modified))
("ETag" (bind :etag))
("Size" (bind :size))
(optional
("Owner"
("ID" (bind :owner-id))
(optional ("DisplayName" (bind :owner-display-name)))))
("StorageClass" (bind :storage-class))))
(sequence :common-prefixes
("CommonPrefixes"
("Prefix" (bind :prefix))))))```
I have made a pull request for this: https://github.com/xach/zs3/pull/35