зеркало из https://github.com/mozilla/pjs.git
Bug 738516 - Auth cache should be set for all requests, not just authenticated requests. r=msamuel
This commit is contained in:
Родитель
8119425bc1
Коммит
f9e0ffdfb3
|
@ -117,8 +117,6 @@ public class BaseResource implements Resource {
|
|||
* @param credentials a string, "user:pass".
|
||||
*/
|
||||
private static void applyCredentials(String credentials, HttpUriRequest request, HttpContext context) {
|
||||
addAuthCacheToContext(request, context);
|
||||
|
||||
Credentials creds = new UsernamePasswordCredentials(credentials);
|
||||
Header header = BasicScheme.authenticate(creds, "US-ASCII", false);
|
||||
request.addHeader(header);
|
||||
|
@ -144,6 +142,8 @@ public class BaseResource implements Resource {
|
|||
BaseResource.applyCredentials(credentials, request, context);
|
||||
}
|
||||
|
||||
addAuthCacheToContext(request, context);
|
||||
|
||||
HttpParams params = client.getParams();
|
||||
HttpConnectionParams.setConnectionTimeout(params, delegate.connectionTimeout());
|
||||
HttpConnectionParams.setSoTimeout(params, delegate.socketTimeout());
|
||||
|
|
Загрузка…
Ссылка в новой задаче