mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
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
This commit is contained in:
parent
4b8853b021
commit
2879b0203f
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user