From 392abf6bf98fae1c29d777be3b0eed41c43cd9f6 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 23 Jul 2004 11:49:59 +0000 Subject: 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 --- libjava/java/lang/System.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libjava/java') 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"); -- cgit v1.1