UserAgentInfo uai = p.parse(userAgent);
String name = uai.getUaName();
int lastSpace = name.lastIndexOf(' ');
String browser = name.substring(0, lastSpace);
String version = name.substring(lastSpace + 1);
har.getLog().setBrowser(new HarNameVersion(browser, version));
} catch (IOException e) {
// ignore it, it's fine
} catch (Exception e) {
LOG.warn("Failed to parse user agent string", e);
}