Remove `robust-http-client` (#10190)

This commit is contained in:
Kris Stern 2025-02-03 05:53:06 +08:00 committed by GitHub
commit 5b446f39ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 12 deletions

View File

@ -287,11 +287,6 @@ THE SOFTWARE.
<artifactId>localizer</artifactId>
<version>1.31</version>
</dependency>
<dependency>
<groupId>org.jvnet.robust-http-client</groupId>
<artifactId>robust-http-client</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jvnet.winp</groupId>
<artifactId>winp</artifactId>

View File

@ -325,10 +325,6 @@ THE SOFTWARE.
<groupId>org.jvnet.localizer</groupId>
<artifactId>localizer</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.robust-http-client</groupId>
<artifactId>robust-http-client</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.winp</groupId>
<artifactId>winp</artifactId>

View File

@ -70,7 +70,6 @@ import jenkins.security.stapler.StaplerAccessibleType;
import jenkins.util.JenkinsJVM;
import jenkins.util.SystemProperties;
import org.jenkinsci.Symbol;
import org.jvnet.robust_http_client.RetryableHttpStream;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.DataBoundConstructor;
@ -346,10 +345,10 @@ public final class ProxyConfiguration extends AbstractDescribableImpl<ProxyConfi
public static InputStream getInputStream(URL url) throws IOException {
final ProxyConfiguration p = get();
if (p == null)
return new RetryableHttpStream(url);
return ((HttpURLConnection) url.openConnection()).getInputStream();
Proxy proxy = p.createProxy(url.getHost());
InputStream is = new RetryableHttpStream(url, proxy);
InputStream is = ((HttpURLConnection) url.openConnection(proxy)).getInputStream();
if (p.getUserName() != null) {
// Add an authenticator which provides the credentials for proxy authentication
Authenticator.setDefault(p.authenticator);