[jbosstools-issues] [JBoss JIRA] (JBIDE-15943) openshift-java-client: Remove useragent hack that allows jenkins plugin to use "OpenShift" in the useragent

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Wed Nov 13 13:38:06 EST 2013


Andre Dietisheim created JBIDE-15943:
----------------------------------------

             Summary: openshift-java-client: Remove useragent hack that allows jenkins plugin to use "OpenShift" in the useragent
                 Key: JBIDE-15943
                 URL: https://issues.jboss.org/browse/JBIDE-15943
             Project: Tools (JBoss Tools)
          Issue Type: Enhancement
          Components: openshift
    Affects Versions: 4.1.1.Beta1
            Reporter: Andre Dietisheim
            Assignee: Andre Dietisheim
             Fix For: 4.1.1.CR1, 4.2.0.Alpha1


There's a "hack" in openshift-java-client that makes sure that  the OpenShift jenkins plugin is using "OpenShift" as user-agent:

{code:title=UrlConnectionHttpClient}
	...
	private static final String USERAGENT_FOR_KEYAUTH = "OpenShift";
	...
	private String setupUserAgent(String authKey, String authIV, String userAgent) {
		if (!StringUtils.isEmpty(authKey)) {
			if (userAgent == null) {
				userAgent = USERAGENT_FOR_KEYAUTH;
			} else if (!userAgent.startsWith(USERAGENT_FOR_KEYAUTH)) {
				userAgent = USERAGENT_FOR_KEYAUTH + '-' + userAgent;
			}
		}
		return userAgent;
	}
{code}

This logic is OpenShift jenkins-plugin specific and should be removed from openshift-java-client.

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