diff options
author | Mark Wielaard <mark@klomp.org> | 2004-07-23 11:49:59 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2004-07-23 11:49:59 +0000 |
commit | 392abf6bf98fae1c29d777be3b0eed41c43cd9f6 (patch) | |
tree | 64aea4322a219bf57b033cdd9cbe3dd03d623c2c /libjava/java/lang | |
parent | 6d97cb60ec7029e1cab1e85eb56b0c322870f6fc (diff) | |
download | gcc-392abf6bf98fae1c29d777be3b0eed41c43cd9f6.zip gcc-392abf6bf98fae1c29d777be3b0eed41c43cd9f6.tar.gz gcc-392abf6bf98fae1c29d777be3b0eed41c43cd9f6.tar.bz2 |
System.java (static): Set http.agent system property when not yet set.
* java/lang/System.java (static): Set http.agent system property when
not yet set.
* gnu/java/net/protocol/http/Connection.java (static): Get httpAgent
from system property inside AccessController.doPrivileged() call.
(proxyPort): Made package private.
(proxyInUse): Likewise.
(proxyHost): Likewise.
(userAgent): Likewise.
From-SVN: r85078
Diffstat (limited to 'libjava/java/lang')
-rw-r--r-- | libjava/java/lang/System.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libjava/java/lang/System.java b/libjava/java/lang/System.java index d752987..a8c0c23 100644 --- a/libjava/java/lang/System.java +++ b/libjava/java/lang/System.java @@ -1,5 +1,6 @@ /* System.java -- useful methods to interface with the system - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -98,6 +99,20 @@ public final class System defaultProperties.put("gnu.classpath.vm.shortname", value); } + // Network properties + if (defaultProperties.get("http.agent") == null) + { + String userAgent + = ("gnu-classpath/" + + defaultProperties.getProperty("gnu.classpath.version") + + " (" + + defaultProperties.getProperty("gnu.classpath.vm.shortname") + + "/" + + defaultProperties.getProperty("java.vm.version") + + ")"); + defaultProperties.put("http.agent", userAgent); + } + defaultProperties.put("gnu.cpu.endian", isWordsBigEndian() ? "big" : "little"); |