diff --git a/libjava/ChangeLog b/libjava/ChangeLog index ba0e431d9ba..7a78f4dcee5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2005-04-29 Michael Koch + + * gnu/java/net/protocol/http/HTTPConnection.java: + (userAgent): Initialize from system properties. + (initUserAgent): Removed. + 2005-04-29 Mark Wielaard * java/util/ResourceBundle.java (getObject): Clarify diff --git a/libjava/gnu/java/net/protocol/http/HTTPConnection.java b/libjava/gnu/java/net/protocol/http/HTTPConnection.java index 20383be59cc..779dbbdfcf9 100644 --- a/libjava/gnu/java/net/protocol/http/HTTPConnection.java +++ b/libjava/gnu/java/net/protocol/http/HTTPConnection.java @@ -1,5 +1,5 @@ /* HTTPConnection.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -39,6 +39,7 @@ exception statement from your version. */ package gnu.java.net.protocol.http; import gnu.classpath.Configuration; +import gnu.classpath.SystemProperties; import gnu.java.net.EmptyX509TrustManager; import gnu.java.net.protocol.http.event.ConnectionEvent; import gnu.java.net.protocol.http.event.ConnectionListener; @@ -83,27 +84,7 @@ public class HTTPConnection */ public static final int HTTPS_PORT = 443; - private static final String userAgent = initUserAgent(); - - private static String initUserAgent() - { - try - { - StringBuffer buf = new StringBuffer("libgcj"); - buf.append(" ("); - buf.append(System.getProperty("os.name")); - buf.append("; "); - buf.append(System.getProperty("os.arch")); - buf.append("; "); - buf.append(System.getProperty("user.language")); - buf.append(")"); - return buf.toString(); - } - catch (SecurityException e) - { - return "inetlib/1.1"; - } - } + private static final String userAgent = SystemProperties.getProperty("http.agent"); /** * The host name of the server to connect to.