zs3 icon indicating copy to clipboard operation
zs3 copied to clipboard

XML binding fails on (all-keys bucket)

Open ppymdjr opened this issue 6 years ago • 1 comments

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))))))```

ppymdjr avatar Sep 26 '19 11:09 ppymdjr

I have made a pull request for this: https://github.com/xach/zs3/pull/35

ppymdjr avatar Sep 26 '19 11:09 ppymdjr