Browse Source

Reverse preemptive auth added for #105 as it breaks reverse proxies with digest, see #499

pull/509/head
Eric Kok 5 years ago
parent
commit
f75afeca4a
  1. 7
      app/src/main/java/org/transdroid/daemon/Transmission/TransmissionAdapter.java

7
app/src/main/java/org/transdroid/daemon/Transmission/TransmissionAdapter.java

@ -418,13 +418,6 @@ public class TransmissionAdapter implements IDaemonAdapter { @@ -418,13 +418,6 @@ public class TransmissionAdapter implements IDaemonAdapter {
httppost.addHeader(sessionHeader, sessionToken);
}
// Force preemptive authentication. This makes sure there is an 'Authentication: ' header being send before trying and failing and
// retrying by the basic authentication mechanism of DefaultHttpClient
if (settings.shouldUseAuthentication() && !TextUtils.isEmpty(settings.getUsername())) {
httppost.addHeader("Authorization", "Basic " +
Base64.encodeBytes((settings.getUsername() + ":" + settings.getPassword()).getBytes()));
}
// Execute
log.d(LOG_NAME, "Execute " + data.getString("method") + " request to " + httppost.getURI().toString());
HttpResponse response = httpclient.execute(httppost);

Loading…
Cancel
Save