rschmitt commented on PR #773: URL: https://github.com/apache/httpcomponents-client/pull/773#issuecomment-3715837759
> HttpClient should be using standard properties defined by the platform or use code configuration. My understanding is that the "standard properties" are part of the standard _for the JDK itself_. The [documentation](https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html) states that these properties "alter the mechanisms and behavior of the various classes of the `java.net` package." Third-party libraries are not called upon to do anything in particular with the `java.net` system properties. I prefer configuration to _generally_ be done through code (the use of system properties in `java.net` to control things like `User-Agent` and `maxConnections` is utterly archaic), but the unique advantage of system properties is that they allow the default behavior of the code to be overridden by someone who knows better config values than the author of the code. This is a really important special case for proxy configuration and TLS trust stores. I'm sympathetic to the idea that these system properties should be respected by default, but I think it's even more important that a Java API like `ignoreSystemProperties()` have a corresponding system property that allows end users to override that behavior. If everyone were to start using `ignoreSystemProperties()`, then we'd be right back where we started: end users can't get their applications working through their proxies without making code changes. That's the problem I want to solve. I'd be willing to consider a default behavior change _just_ for the proxy behavior. I'm concerned that categorically switching the default behavior for all system properties we handle is too broad a change; that would potentially affect a lot of unrelated things at three or four different OSI layers. But I'd also like you to consider that there are really good reasons why most libraries define their own system properties, and that "standardization" isn't really the right framework for making this decision. Imagine an HTTP client that only supported "standard" HTTP headers. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
