private void handleSessionRequest(AsyncContext context, HttpBindBody body)
            throws IOException
    {
        final String sid = body.getSid();
        if (HttpBindManager.LOG_HTTPBIND_ENABLED.getValue()) {
            Log.info("HTTP RECV({}): {}", sid, body.asXML());
        }

        HttpSession session = sessionManager.getSession(sid);
        if (session == null) {
            Log.debug("Client provided invalid session: {}. [{}]", sid, context.getRequest().getRemoteAddr());
            sendLegacyError(context, BoshBindingError.itemNotFound, "Invalid SID value.");
            return;
        }

        synchronized (session) {
            try {
                session.forwardRequest(body, context);
            }
            catch (HttpBindException e) {
                sendError(session, context, e.getBindingError());
            }
            catch (HttpConnectionClosedException nc) {
                Log.error("Error sending packet to client.", nc);
                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