Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add X-History-Location headers support for containers and fix travis build config bug #1268

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ after_success:
# infrastructure. This should prevent the buffer overflow from
# https://github.com/travis-ci/travis-ci/issues/5227
sudo: false

# due to travis-ci changes in default build environment,
# this must be specify in order for oraclejdk8 to install
# https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment
dist: trusty
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public final class SwiftHeaders {

// Versioning
public static final String VERSIONS_LOCATION = "X-Versions-Location";
public static final String HISTORY_LOCATION = "X-History-Location";

// ACL's (not all implementations support this)
public static final String CONTAINER_READ = "X-Container-Read";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ public CreateUpdateContainerOptions versionsLocation(String containerName) {
add(VERSIONS_LOCATION, containerName);
return this;
}

/**
* Enables history versioning mode on this container. The value is the name of another container.
* You must UTF-8-encode and then URL-encode the name before you include it in the header.
* To disable versioning, set the header to an empty string.
*
* @param containerName the container name of the other container
* @return CreateUpdateContainerOptions
*/
public CreateUpdateContainerOptions historyLocation(String containerName) {
add(HISTORY_LOCATION, containerName);
return this;
}

/**
* Sets the read ACL (if supported) to allow public access
Expand Down