public static String getHttpServletRequestUserAgent(final HttpServletRequest request) {
        if (request != null) {
            return request.getHeader(HttpHeaders.USER_AGENT);
        }
        return null;
    }
Gets http servlet request user agent.

@param request the request
@return the http servlet request user agent
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/http/HttpRequestUtils.java