diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-23 11:49:59 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-23 11:49:59 +0000 |
commit | 63c1657bf2b88278b3c0e629f91cf95a3804e18a (patch) | |
tree | 64aea4322a219bf57b033cdd9cbe3dd03d623c2c /libjava/java/lang/System.java | |
parent | 374520f703d1ba4701d7974a586978edeb9cb8a0 (diff) | |
download | ppe42-gcc-63c1657bf2b88278b3c0e629f91cf95a3804e18a.tar.gz ppe42-gcc-63c1657bf2b88278b3c0e629f91cf95a3804e18a.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/System.java')
-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 d7529871845..a8c0c23c0db 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"); |