def execute
      if refresh_lock?
        lock_properties = @resource.refresh_lock
      elsif resource_locked?
        return :locked
      else
        # The `lockinfo` tag is used to specify the type of lock the client
        # wishes to have created.
        xml = xml_for body: body, node: 'lockinfo'
        return :bad_request if xml == :bad_request

        lock_properties = @resource.lock xml, @headers['Depth']
      end

      build_response lock_properties
    end
def execute
      if refresh_lock?
        lock_properties = @resource.refresh_lock
      elsif resource_locked?
        return :locked
      else
        # The `lockinfo` tag is used to specify the type of lock the client
        # wishes to have created.
        xml = xml_for body: body, node: 'lockinfo'
        return :bad_request if xml == :bad_request

        lock_properties = @resource.lock xml, @headers['Depth']
      end

      build_response lock_properties
    end
:nodoc:
 Executes the WebDAV request for a particular resource.