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

S3Interface - versioning lacking #22

Open
tomandersen opened this issue Oct 26, 2010 · 0 comments
Open

S3Interface - versioning lacking #22

tomandersen opened this issue Oct 26, 2010 · 0 comments

Comments

@tomandersen
Copy link

It is pretty easy to add. Its almost exactly like the logging call.

Roughly:
def put_versioning(bucket, state, aws_id, aws_secret)
xmldoc = "<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/\"&gt;&lt;Status&gt;#{state}&lt;/Status&gt;&lt;/VersioningConfiguration>"
the_params[:headers] = {}
req_hash = generate_rest_request('PUT', the_params[:headers].merge(:url=>"#{bucket}?versioning", :data => xmldoc))
#request_info(req_hash, S3TrueParser.new)
request_info(req_hash, RightDummyParser.new)
rescue
on_exception
end

Also in canonical_string, you need to add...
out_string << '?versioning' if path[/[&?]versioning($|&|=)/] # all these hardwired constants are weird here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant