[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 15:57:05 EST 2013


    [ https://issues.jboss.org/browse/JBIDE-15943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923297#comment-12923297 ] 

Andre Dietisheim commented on JBIDE-15943:
------------------------------------------

openshift-bot merged the PR to upstream master and I deployed the new openshift-java-client 2.5.0-SNAPHOT to repository.jboss.org:

{code}
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/openshift-java-client-2.5.0-20131113.205412-11.jar
Uploaded: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/openshift-java-client-2.5.0-20131113.205412-11.jar (205 KB at 22.9 KB/sec)
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/openshift-java-client-2.5.0-20131113.205412-11.pom
Uploaded: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/openshift-java-client-2.5.0-20131113.205412-11.pom (9 KB at 1.8 KB/sec)
Downloading: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/maven-metadata.xml
Downloaded: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/maven-metadata.xml (514 B at 0.5 KB/sec)
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/maven-metadata.xml
Uploaded: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/maven-metadata.xml (1002 B at 0.4 KB/sec)
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/maven-metadata.xml
Uploaded: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/maven-metadata.xml (514 B at 0.2 KB/sec)
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/openshift-java-client-2.5.0-20131113.205412-11-sources.jar
Uploaded: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/openshift-java-client-2.5.0-20131113.205412-11-sources.jar (133 KB at 31.9 KB/sec)
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/maven-metadata.xml
Uploaded: https://repository.jboss.org/nexus/content/repositories/snapshots/com/openshift/openshift-java-client/2.5.0-SNAPSHOT/maven-metadata.xml (1002 B at 0.2 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.971s
[INFO] Finished at: Wed Nov 13 21:54:40 CET 2013
[INFO] Final Memory: 15M/207M
[INFO] ------------------------------------------------------------------------
{code}
                
> 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
>              Labels: openshift-java-client
>             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