Skip to content

Commit c8722d2

Browse files
[JENKINS-64418] Add exponential backoff to BitBucket rate limit retry loop (#959)
Fix duplicate base URL in request to Bitbucket Server. The problem is that getSingleBranch prepends this.baseURL to the URI template and calls getResource, which expands the template and prepends this.baseURL to the resulting URL again. Method getResource is called only by getSingleTag and getSingleBranch, and both of them include the base URL in the template. Thus, getResource should not prepend it again.
1 parent 441929e commit c8722d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ private <V> V getResource(UriTemplate template, Class<? extends PagedApiResponse
903903
.set("start", pageNumber) //
904904
.set("limit", limit) //
905905
.expand();
906-
String response = getRequest(this.baseURL + url);
906+
String response = getRequest(url);
907907
try {
908908
page = JsonParser.toJava(response, clazz);
909909
} catch (IOException e) {

0 commit comments

Comments
 (0)