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
This commit is contained in:
committed by
Mark Wielaard
parent
6d97cb60ec
commit
392abf6bf9
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user