private String getMessage(Exception e, HttpRequest request) {
        if (request.getBooleanProperty("debug")) {
            StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);
            e.printStackTrace(pw);
            return sw.toString();
        } else {
            return Exceptions.toMessageString(e);
        }
    }
Super class for http handlers, that takes care of checking valid
methods for a request. Handlers should subclass this method and
implement the handleMETHOD methods that it supports.

@author hmusum
configserver/src/main/java/com/yahoo/vespa/config/server/http/HttpHandler.java