# File lib/openstack/swift/storage_object.rb, line 193
    def set_metadata(metadatahash)
      headers  = metadatahash.inject({}){|res, (k,v)| ((k.to_s.match /^X-Object-Meta-/i) ? res[k.to_s]=v : res["X-Object-Meta-#{k.to_s}"]=v ) ;res}
      headers['content-type'] = 'application/json'
      path = "/#{@containername}/#{@name}"
      begin
        response = @container.swift.connection.req("POST", URI.encode(path), {:headers=>headers})
      rescue OpenStack::Exception::ItemNotFound => not_found
        msg = "Can't set metadata: No Object \"#{@name}\" found in Container \"#{@containername}\".  #{not_found.message}"
        raise OpenStack::Exception::ItemNotFound.new(msg, not_found.response_code, not_found.response_body)
      end
      true
    end