[
https://issues.jboss.org/browse/JBIDE-13888?page=com.atlassian.jira.plugi...
]
Andre Dietisheim commented on JBIDE-13888:
------------------------------------------
In the openshift-java-client it currently looks like as if the useragent is not sent:
{code:title=RestServiceProperties}
public String getUseragent(String id) {
String version = getVersion();
String useragentPattern = getUseragentPattern();
if (!StringUtils.isEmpty(id)
&& !StringUtils.isEmpty(version)
&& !StringUtils.isEmpty(useragentPattern)) {
String userAgent = MessageFormat.format(getUseragentPattern(), getVersion(), id);
}
return null;
}
{code}
this method always returns *null*, thus the useragent should always be null.
The http client will obviously not send the user agent since it would not set it if
it's null:
{code:title=UrlConnectionHttpClient}
private void setUserAgent(HttpURLConnection connection) {
String userAgent = this.userAgent;
if (!StringUtils.isEmpty(authKey)) {
userAgent = USERAGENT_FOR_KEYAUTH;
}
if (userAgent != null){
connection.setRequestProperty(PROPERTY_USER_AGENT, userAgent);
}
}
{code}
openshift-java-client: make sure useragent is sent
--------------------------------------------------
Key: JBIDE-13888
URL:
https://issues.jboss.org/browse/JBIDE-13888
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.1.0.Alpha2
Reporter: Andre Dietisheim
Assignee: Andre Dietisheim
Fix For: 4.1.0.Alpha2
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira