Uploaded image for project: 'OpenShift Java Client'
  1. OpenShift Java Client
  2. OSJC-8

openshift-java-client: Remove useragent hack that allows jenkins plugin to use "OpenShift" in the useragent

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 2.5.0
    • None
    • None

    Description

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

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

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

      Attachments

        Issue Links

          Activity

            People

              adietish@redhat.com André Dietisheim
              adietish@redhat.com André Dietisheim
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: