Skip to content

Commit

Permalink
fix: rename variable that's clashing with variable in TokenRequestBas…
Browse files Browse the repository at this point in the history
…edAuthenticatorImmutable
  • Loading branch information
emlaver committed Oct 17, 2024
1 parent 9a12e74 commit 6d6afeb
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class CouchDbSessionAuthenticator
private final ServiceCookieJar cookieJar;

private HttpUrl sessionUrl = null;
private Headers headers = null;
private Headers sessionHeaders = null;

/**
* Get a new Authenticator instance for the supplied service URL and credentials that provides
Expand Down Expand Up @@ -108,7 +108,7 @@ public void setHeaders(Map<String, String> headers) {
mergedHeaders.putAll(headers);
super.setHeaders(mergedHeaders);
// Store the headers in OkHttp format
this.headers = Headers.of(mergedHeaders);
this.sessionHeaders = Headers.of(mergedHeaders);
}

@Override
Expand Down Expand Up @@ -142,9 +142,9 @@ public CouchDbSessionToken requestToken() {
.bodyJson(creds);

// Apply custom headers if necessary
if (headers != null) {
for (String key : headers.names()) {
postSessionbuilder.header(key, headers.get(key));
if (sessionHeaders != null) {
for (String key : sessionHeaders.names()) {
postSessionbuilder.header(key, sessionHeaders.get(key));
}
}

Expand Down

0 comments on commit 6d6afeb

Please sign in to comment.