S3Interface - versioning lacking
tomandersen opened this issue · comments
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/\"><Status>#{state}</Status></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.