Previously, function erroneously assumed that XML response always had <Content> elements listed last, and merely used tail() to get the Key of the last element for use as NextMarker.
This assumption relying on ordering rather than explicitly using element names fails when clients (Redhat's CEPH S3 interface, an open source product widely used in research data centers) return XML that lists metadata fields. Moreover, the S3 response actually provides a field called NextMarker for this very purpose, which ought to be used instead of attempting to find the last key. My pull request simply updates the code to use r$NextMarker to find the NextMarker instead of using tail(r, 1)[["Contents"]][["Key"]])
Please ensure the following before submitting a PR:
[x] if suggesting code changes or improvements, open an issue first
[x] for all but trivial changes (e.g., typo fixes), add your name to DESCRIPTION (already a contributor)
[x] for all but trivial changes (e.g., typo fixes), documentation your change in NEWS.md with a parenthetical reference to the issue number being addressed
[x] if changing documentation, edit files in /R not /man and run devtools::document() to update documentation
[x] add code or new test files to /tests for any new functionality or bug fix
[x] make sure R CMD check runs without error before submitting the PR
Previously, function erroneously assumed that XML response always had
<Content>
elements listed last, and merely usedtail()
to get the Key of the last element for use as NextMarker.This assumption relying on ordering rather than explicitly using element names fails when clients (Redhat's CEPH S3 interface, an open source product widely used in research data centers) return XML that lists metadata fields. Moreover, the S3 response actually provides a field called NextMarker for this very purpose, which ought to be used instead of attempting to find the last key. My pull request simply updates the code to use
r$NextMarker
to find the NextMarker instead of usingtail(r, 1)[["Contents"]][["Key"]])
Please ensure the following before submitting a PR:
/R
not/man
and rundevtools::document()
to update documentation/tests
for any new functionality or bug fixR CMD check
runs without error before submitting the PR