From d4b15ae4dd0227a5a729c1473cb7c630d274d7fd Mon Sep 17 00:00:00 2001 From: Ed Merks Date: Tue, 14 Nov 2023 11:17:25 +0100 Subject: [PATCH] Fix HttpClientProxyCredentialProvider.getPasswordAuthentication Ensure that httpclientjava's HttpClientProxyCredentialProvider.getCredentials(AuthScope) is called with a correct AuthScope from getPasswordAuthentication. Also update some target platform dependencies for the 2022-03 target to use the most recently released versions of client5/core5. Focus particularly on what is required by the httpclient5 feature because that's pulled into p2 and hence almost all installations, e.g., it does not need to include org.apache.commons.logging and should use the latest org.apache.commons.commons-codec rather than org.apache.commons.codec. https://github.com/eclipse/ecf/issues/76 https://github.com/eclipse/ecf/issues/77 --- .../TimeServiceHost.xmlrpc.zeroconf.product | 6 +- pom.xml | 4 +- .../HttpClientProxyCredentialProvider.java | 2 +- .../feature.xml | 4 +- .../pom.xml | 2 +- .../feature.xml | 4 +- .../pom.xml | 2 +- .../feature.xml | 9 +- .../feature.xml | 2 +- .../ecf-2022-03.target | 620 +----------------- .../META-INF/MANIFEST.MF | 4 +- .../pom.xml | 2 +- 12 files changed, 33 insertions(+), 628 deletions(-) diff --git a/examples/bundles/com.mycorp.examples.timeservice.host/launch/TimeServiceHost.xmlrpc.zeroconf.product b/examples/bundles/com.mycorp.examples.timeservice.host/launch/TimeServiceHost.xmlrpc.zeroconf.product index ff7066aa42..7aee8e569a 100644 --- a/examples/bundles/com.mycorp.examples.timeservice.host/launch/TimeServiceHost.xmlrpc.zeroconf.product +++ b/examples/bundles/com.mycorp.examples.timeservice.host/launch/TimeServiceHost.xmlrpc.zeroconf.product @@ -1,7 +1,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/pom.xml b/pom.xml index a055baacdd..47c6264baa 100644 --- a/pom.xml +++ b/pom.xml @@ -75,6 +75,7 @@ 2.7.5 1.3.2 2022-03 + JavaSE-17 https://download.eclipse.org/eclipse/updates/latest/ ISO-8859-1 ISO-8859-1 @@ -285,6 +286,7 @@ 1.0.0-SNAPSHOT + ${execution-environment} win32 @@ -405,7 +407,7 @@ ${eclipserun-repo} - JavaSE-11 + ${execution-environment} diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclientjava/src/org/eclipse/ecf/internal/provider/filetransfer/httpclientjava/HttpClientProxyCredentialProvider.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclientjava/src/org/eclipse/ecf/internal/provider/filetransfer/httpclientjava/HttpClientProxyCredentialProvider.java index 962e8351d5..5c685511d8 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclientjava/src/org/eclipse/ecf/internal/provider/filetransfer/httpclientjava/HttpClientProxyCredentialProvider.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclientjava/src/org/eclipse/ecf/internal/provider/filetransfer/httpclientjava/HttpClientProxyCredentialProvider.java @@ -74,7 +74,7 @@ protected NTCredentials getNTLMCredentials(Proxy proxy) { @Override protected PasswordAuthentication getPasswordAuthentication() { if (getRequestorType() == RequestorType.PROXY) { - Credentials credential = getCredentials(null); // TODO + Credentials credential = getCredentials(new AuthScope(getRequestingHost(), getRequestingPort())); if (credential != null) { return new PasswordAuthentication(credential.getUserName(), credential.getPassword()); } diff --git a/releng/features/org.eclipse.ecf.filetransfer.httpclient4.feature/feature.xml b/releng/features/org.eclipse.ecf.filetransfer.httpclient4.feature/feature.xml index ec88bfac86..bf5a5b6533 100644 --- a/releng/features/org.eclipse.ecf.filetransfer.httpclient4.feature/feature.xml +++ b/releng/features/org.eclipse.ecf.filetransfer.httpclient4.feature/feature.xml @@ -2,7 +2,7 @@ @@ -31,7 +31,7 @@ unpack="false"/> org.eclipse.ecf org.eclipse.ecf.filetransfer.httpclient4.feature - 3.14.32-SNAPSHOT + 3.14.33-SNAPSHOT eclipse-feature diff --git a/releng/features/org.eclipse.ecf.filetransfer.httpclient45.feature/feature.xml b/releng/features/org.eclipse.ecf.filetransfer.httpclient45.feature/feature.xml index b2a5b32f55..1e3002d6ac 100644 --- a/releng/features/org.eclipse.ecf.filetransfer.httpclient45.feature/feature.xml +++ b/releng/features/org.eclipse.ecf.filetransfer.httpclient45.feature/feature.xml @@ -2,7 +2,7 @@ @@ -39,7 +39,7 @@ unpack="false"/> ../../../ org.eclipse.ecf.filetransfer.httpclient45.feature - 1.1.100-SNAPSHOT + 1.1.101-SNAPSHOT eclipse-feature diff --git a/releng/features/org.eclipse.ecf.filetransfer.httpclient5.feature/feature.xml b/releng/features/org.eclipse.ecf.filetransfer.httpclient5.feature/feature.xml index 852d187f34..2386a17b0e 100644 --- a/releng/features/org.eclipse.ecf.filetransfer.httpclient5.feature/feature.xml +++ b/releng/features/org.eclipse.ecf.filetransfer.httpclient5.feature/feature.xml @@ -39,14 +39,7 @@ unpack="false"/> - - - + diff --git a/releng/org.eclipse.ecf.releng.target/ecf-2022-03.target b/releng/org.eclipse.ecf.releng.target/ecf-2022-03.target index ef88c1c3f7..0ca2e0142e 100644 --- a/releng/org.eclipse.ecf.releng.target/ecf-2022-03.target +++ b/releng/org.eclipse.ecf.releng.target/ecf-2022-03.target @@ -23,22 +23,24 @@ - - - - + + + + + + + + + + + + + + + - - - - - - - - - @@ -71,596 +73,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/META-INF/MANIFEST.MF index 044e8b63ab..340116d46e 100644 --- a/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/META-INF/MANIFEST.MF +++ b/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %plugin.name Bundle-SymbolicName: org.eclipse.ecf.tests.apache.httpclient.server Automatic-Module-Name: org.eclipse.ecf.tests.apache.httpclient.server -Bundle-Version: 3.0.101.qualifier +Bundle-Version: 3.0.102.qualifier Bundle-Vendor: %plugin.provider Bundle-RequiredExecutionEnvironment: J2SE-1.4 Import-Package: org.osgi.framework;version="1.3.0" @@ -11,6 +11,6 @@ Bundle-ActivationPolicy: lazy Require-Bundle: org.junit;bundle-version="3.8.2", org.apache.commons.httpclient;bundle-version="3.0.1", org.apache.commons.logging;bundle-version="1.0.4", - org.apache.commons.codec;bundle-version="1.2.0" + org.apache.commons.commons-codec;bundle-version="1.2.0" Bundle-Localization: plugin Export-Package: org.apache.commons.httpclient.server diff --git a/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/pom.xml b/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/pom.xml index a71eddda81..db372f53f0 100644 --- a/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/pom.xml +++ b/tests/bundles/org.eclipse.ecf.tests.apache.httpclient.server/pom.xml @@ -9,6 +9,6 @@ org.eclipse.ecf org.eclipse.ecf.tests.apache.httpclient.server - 3.0.101-SNAPSHOT + 3.0.102-SNAPSHOT eclipse-plugin