protected static void sendLegacyError(AsyncContext context, BoshBindingError error, String message)
            throws IOException
    {
        final HttpServletResponse response = (HttpServletResponse) context.getResponse();
        if (message == null || message.trim().isEmpty()) {
            response.sendError(error.getLegacyErrorCode());
        } else {
            response.sendError(error.getLegacyErrorCode(), message);
        }
        context.complete();
    }
Servlet which handles requests to the HTTP binding service. It determines if there is currently
an {@link HttpSession} related to the connection or if one needs to be created and then passes it
off to the {@link HttpBindManager} for processing of the client request and formulating of the
response.

@author Alexander Wenckus
xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpBindServlet.java