String userAgent = request.getHeader("User-Agent");
if ("text/event-stream".equals(accept)) {
return new EventSourceCometServletResponse(request, response, serializationPolicy, clientOracle, this, async, requestHeartbeat);
}
else if ("application/comet".equals(accept)) {
return new HTTPRequestCometServletResponse(request, response, serializationPolicy, clientOracle, this, async, requestHeartbeat);
}
else if (userAgent != null && userAgent.contains("Opera")) {
return new OperaEventSourceCometServletResponse(request, response, serializationPolicy, clientOracle, this, async, requestHeartbeat);
}
else {