[jbosstools-issues] [JBoss JIRA] (JBIDE-13891) openshift-java-client: client should not hard-code user-agent if you're usign keys

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Tue Apr 2 03:29:41 EDT 2013


Andre Dietisheim created JBIDE-13891:
----------------------------------------

             Summary: openshift-java-client: client should not hard-code user-agent if you're usign keys
                 Key: JBIDE-13891
                 URL: https://issues.jboss.org/browse/JBIDE-13891
             Project: Tools (JBoss Tools)
          Issue Type: Enhancement
          Components: openshift
    Affects Versions: 4.1.0.Alpha2
            Reporter: Andre Dietisheim
            Assignee: Andre Dietisheim
             Fix For: 4.1.x


There is also very weird code in the UrlConnectionHttpClientBuilder which holds user-agent building logic. IMHO this logic should be in the rest service, not in the builder since the user-agent should get built correctly even if you create the client directly or use the builder:

{code:title=UrlConnectionHttpClientBuilder}
	public IHttpClient client() {
		if (authKey != null && authKey.trim().length() > 0) {
			if (userAgent == null) {
				userAgent = "OpenShift";
			} else if (!userAgent.startsWith("OpenShift")) {
				userAgent = "OpenShift-" + userAgent;
			}
		}
		return new UrlConnectionHttpClient(username, password, userAgent,
				sslChecks, requestMediaType, acceptedMediaType, version,
				authKey, authIV);
	}

{code}

--
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


More information about the jbosstools-issues mailing list