<commit_before>package com.whizzosoftware.hobson.webconsole;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.routing.Router;

public class WebConsoleApplication extends Application {
    @Override
    public Restlet createInboundRoot() {
        Router router = new Router();
        router.attach("/", new ClassLoaderOverrideDirectory(getContext(), "clap://class/www/", getClass().getClassLoader()));
        return router;
    }
}<commit_msg>Added redirection handling for /console and /console/<commit_after>package com.whizzosoftware.hobson.webconsole;

import org.restlet.Application;
import org.restlet.Request;
import org.restlet.Response;
import org.restlet.Restlet;
import org.restlet.data.Reference;
import org.restlet.routing.Redirector;
import org.restlet.routing.Router;

public class WebConsoleApplication extends Application {
    @Override
    public Restlet createInboundRoot() {
        Router router = new Router();
        router.attach("/", new ClassLoaderOverrideDirectory(getContext(), "clap://class/www/", getClass().getClassLoader()));
        return router;
    }

    @Override
    public void handle(Request request, Response response) {
        Reference ref = request.getResourceRef();
        if ("/console".equals(ref.getPath()) || "/console/".equals(ref.getPath())) {
            response.redirectPermanent("/console/index.html");
        } else {
            super.handle(request, response);
        }
    }
}
{'fraction_non_alphanumeric': 0.12135593220338983, 'fraction_numerical': 0.0, 'mean_word_length': 3.7766990291262137, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5713945', 'n_tokens_mistral': 404, 'n_tokens_neox': 403, 'n_words': 87}