229 String[] parts = list.split("\\s*,\\s*");
230 for (String part : parts)
231 s.add(part.toLowerCase(Locale.ROOT));
232 return s;
233 }
234
235 static {
236 Properties props = GetPropertyAction.privilegedGetProperties();
237 maxRedirects = GetIntegerAction.privilegedGetProperty(
238 "http.maxRedirects", defaultmaxRedirects);
239 version = props.getProperty("java.version");
240 String agent = props.getProperty("http.agent");
241 if (agent == null) {
242 agent = "Java/"+version;
243 } else {
244 agent = agent + " Java/"+version;
245 }
246 userAgent = agent;
247
248 // A set of net properties to control the use of authentication schemes
249 // when proxing/tunneling.
250 String p = getNetProperty("jdk.http.auth.tunneling.disabledSchemes");
251 disabledTunnelingSchemes = schemesListToSet(p);
252 p = getNetProperty("jdk.http.auth.proxying.disabledSchemes");
253 disabledProxyingSchemes = schemesListToSet(p);
254
255 validateProxy = Boolean.parseBoolean(
256 props.getProperty("http.auth.digest.validateProxy"));
257 validateServer = Boolean.parseBoolean(
258 props.getProperty("http.auth.digest.validateServer"));
259
260 enableESBuffer = Boolean.parseBoolean(
261 props.getProperty("sun.net.http.errorstream.enableBuffering"));
262 timeout4ESBuffer = GetIntegerAction.privilegedGetProperty(
263 "sun.net.http.errorstream.timeout", 300);
264 if (timeout4ESBuffer <= 0) {
265 timeout4ESBuffer = 300; // use the default
266 }
267
268 bufSize4ES = GetIntegerAction.privilegedGetProperty(
269 "sun.net.http.errorstream.bufferSize", 4096);
|
229 String[] parts = list.split("\\s*,\\s*");
230 for (String part : parts)
231 s.add(part.toLowerCase(Locale.ROOT));
232 return s;
233 }
234
235 static {
236 Properties props = GetPropertyAction.privilegedGetProperties();
237 maxRedirects = GetIntegerAction.privilegedGetProperty(
238 "http.maxRedirects", defaultmaxRedirects);
239 version = props.getProperty("java.version");
240 String agent = props.getProperty("http.agent");
241 if (agent == null) {
242 agent = "Java/"+version;
243 } else {
244 agent = agent + " Java/"+version;
245 }
246 userAgent = agent;
247
248 // A set of net properties to control the use of authentication schemes
249 // when proxying/tunneling.
250 String p = getNetProperty("jdk.http.auth.tunneling.disabledSchemes");
251 disabledTunnelingSchemes = schemesListToSet(p);
252 p = getNetProperty("jdk.http.auth.proxying.disabledSchemes");
253 disabledProxyingSchemes = schemesListToSet(p);
254
255 validateProxy = Boolean.parseBoolean(
256 props.getProperty("http.auth.digest.validateProxy"));
257 validateServer = Boolean.parseBoolean(
258 props.getProperty("http.auth.digest.validateServer"));
259
260 enableESBuffer = Boolean.parseBoolean(
261 props.getProperty("sun.net.http.errorstream.enableBuffering"));
262 timeout4ESBuffer = GetIntegerAction.privilegedGetProperty(
263 "sun.net.http.errorstream.timeout", 300);
264 if (timeout4ESBuffer <= 0) {
265 timeout4ESBuffer = 300; // use the default
266 }
267
268 bufSize4ES = GetIntegerAction.privilegedGetProperty(
269 "sun.net.http.errorstream.bufferSize", 4096);
|