protected void processContent(AsyncContext context, String content) throws IOException
    {
        final String remoteAddress = getRemoteAddress(context);

        final HttpBindBody body;
        try {
            body = HttpBindBody.from( content );
        } catch (Exception ex) {
            Log.warn("Error parsing request data from [{}]", remoteAddress, ex);
            sendLegacyError(context, BoshBindingError.badRequest);
            return;
        }

        final Long rid = body.getRid();
        if (rid == null || rid <= 0) {
            Log.info("Root element 'body' does not contain a valid RID attribute value in parsed request data from [{}]", remoteAddress);
            sendLegacyError(context, BoshBindingError.badRequest, "Body-element is missing a RID (Request ID) value, or the provided value is a non-positive integer.");
            return;
        }

        // Process the parsed document.
        if (body.getSid() == null) {
            // When there's no Session ID, this should be a request to create a new session. If there's additional content,
            // something is wrong.
            if (!body.isEmpty()) {
                // invalid session request; missing sid
                Log.info("Root element 'body' does not contain a SID attribute value in parsed request data from [{}]", remoteAddress);
                sendLegacyError(context, BoshBindingError.badRequest);
                return;
            }

            // We have a new session
            createNewSession(context, body);
        }
        else {
            // When there exists a Session ID, new data for an existing session is being provided.
            handleSessionRequest(context, body);
        }
    }
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