package com.atlassian.bitbucket.internal.ssh.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Simple handler that always sends a 404 error
 */
class NotFoundHandler implements SshKeysRequestHandler {
    @Override
    public void get(SshKeysRequest request, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.sendError(HttpServletResponse.SC_NOT_FOUND);
    }

    @Override
    public void post(SshKeysRequest request, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.sendError(HttpServletResponse.SC_NOT_FOUND);
    }
}
