Skip to content

S3Interface - versioning lacking #22

@tomandersen

Description

@tomandersen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions