summaryrefslogtreecommitdiff
path: root/java/lang
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2004-07-23 11:40:04 +0000
committerMark Wielaard <mark@klomp.org>2004-07-23 11:40:04 +0000
commitb9872400f711e80ccc43b509128b5e77ba8d8d83 (patch)
tree83b7b87fe0af93e7b1adccdf0a08a991fc9112f4 /java/lang
parentdc2bc8c757d09cbec12bda41488d1df727e03b07 (diff)
downloadclasspath-b9872400f711e80ccc43b509128b5e77ba8d8d83.tar.gz
* 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.
Diffstat (limited to 'java/lang')
-rw-r--r--java/lang/System.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/java/lang/System.java b/java/lang/System.java
index 94ddb90a0..50112e885 100644
--- a/java/lang/System.java
+++ b/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.
@@ -95,6 +96,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",
VMSystem.isWordsBigEndian() ? "big" : "little");