# File mod_docs/redirect.rb, line 14 def publish(script_name, request, response, logger) logger.debug("enter document: #{self.class}") case (request.method) when 'GET', 'HEAD' response.status = @status response.set_header('Location', @location) response.set_header('Content-Type', 'text/plain') response.absolute_location(request) response.start_body response << "Jump to #{@location}.\n" if (request.method != 'HEAD') else ex = HTTPError.new(405) # Method Not Allowed ex.set_header('Allow', 'GET, HEAD') raise ex end nil end