Commit 2879b020 by Michael Koch Committed by Michael Koch

2005-04-29 Michael Koch <konqueror@gmx.de>

	* gnu/java/net/protocol/http/HTTPConnection.java:
	(userAgent): Initialize from system properties.
	(initUserAgent): Removed.

From-SVN: r98977
parent 4b8853b0
2005-04-29 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/HTTPConnection.java:
(userAgent): Initialize from system properties.
(initUserAgent): Removed.
2005-04-29 Mark Wielaard <mark@klomp.org>
* java/util/ResourceBundle.java (getObject): Clarify
......
/* 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment