From: <pn...@hy...> - 2010-04-15 20:57:21
|
Author: pnguyen Date: 2010-04-15 13:57:10 -0700 (Thu, 15 Apr 2010) New Revision: 14508 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14508 Modified: trunk/plugins/netservices/src/org/hyperic/hq/plugin/netservices/HTTPCollector.java Log: [HHQ-3446] Rename the property to "http.useragent" and make it an "agent.properties" top-level property instead of a system property. Modified: trunk/plugins/netservices/src/org/hyperic/hq/plugin/netservices/HTTPCollector.java =================================================================== --- trunk/plugins/netservices/src/org/hyperic/hq/plugin/netservices/HTTPCollector.java 2010-04-15 07:53:09 UTC (rev 14507) +++ trunk/plugins/netservices/src/org/hyperic/hq/plugin/netservices/HTTPCollector.java 2010-04-15 20:57:10 UTC (rev 14508) @@ -88,10 +88,12 @@ this.url = protocol + "://" + getHostname() + ":" + getPort() + getPath(); - this.useragent = - System.getProperty("httpclient.useragent", - "Hyperic-HQ-Agent/" + ProductProperties.getVersion()); + this.useragent = getPlugin().getManagerProperty("http.useragent"); + if (this.useragent == null || this.useragent.trim().length() == 0) { + this.useragent = "Hyperic-HQ-Agent/" + ProductProperties.getVersion(); + } + //for log_track setSource(this.url); |