jenkinsci / jenkinsci/java-client-api

DisableRedirectHandling in JenkinsHttpClient

Open
#235 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
913
Forks
466
PR merge metrics
No merged PRs in 30d

Description

When calling a GET for job///toggleLogKeep, I get an exception thrown:
org.apache.http.client.CircularRedirectException: Circular redirect to 'https:///job///toggleLogKeep/api/'

If I edit the source code in JenkinsHttpClient.addAuthentication(HttpClientBuilder builder, URI uri, String username, String password) to add HttpClientBuilder.disableRedirectHandling(), this prevents the Exception from being thrown and allows me to toggle the "Keep build forever" functionality.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.