Apparently, sun.net.www.protocol.http.HttpURLConnection will always append "Java/version" to the UserAgent. Therefore, JSoup Connection.userAgent cannot set the useragent to what you want; the "Java/version" stuff gets appended anyway.
See Set user-agent property in https connection header
Some websites reject requests that contain "Java" anywhere in the user agent, giving various 4xx and 5xx HTTP errors.
The StackOverflow post referenced above suggests using Apache instead of Sun's HTTP connection class, but this is not an option if I want to use JSoup.
I wonder what the JSoup team thinks of this. Is my description correct? Is it a bug or a feature? Are there any plans to fix it, i.e. to make it possible to set the userAgent to what one wants, without additional appendages?
thanks JWG