[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
Fri Apr 5 05:49:42 EDT 2013


     [ https://issues.jboss.org/browse/JBIDE-13891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andre Dietisheim updated JBIDE-13891:
-------------------------------------

    Fix Version/s: 4.1.0.Beta1
                       (was: 4.1.x)

    
> 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.0.Beta1
>
>
> 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