# File lib/openid/server.rb, line 804
      def cancel_url
        # Get the URL to cancel this request.
        #
        # Useful for creating a "Cancel" button on a web form so that
        # operation can be carried out directly without another trip
        # through the server.
        #
        # (Except you may want to make another trip through the
        # server so that it knows that the user did make a decision.)
        #
        # Returns a URL as a string.
        if !@return_to
          raise NoReturnToError
        end

        if @immediate
          raise ArgumentError.new("Cancel is not an appropriate response to " +
                                  "immediate mode requests.")
        end

        response = Message.new(@message.get_openid_namespace)
        response.set_arg(OPENID_NS, 'mode', 'cancel')
        return response.to_url(@return_to)
      end