mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset cc1bac015920 (bug 966560) for xpcshell failures.
This commit is contained in:
parent
d48a905e54
commit
721d315595
@ -194,11 +194,7 @@ HawkClient.prototype = {
|
||||
};
|
||||
|
||||
let request = new HAWKAuthenticatedRESTRequest(uri, credentials, extra);
|
||||
if (method == "post" || method == "put") {
|
||||
request[method](payloadObj, onComplete);
|
||||
} else {
|
||||
request[method](onComplete);
|
||||
}
|
||||
request[method](payloadObj, onComplete);
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
@ -763,25 +763,19 @@ HAWKAuthenticatedRESTRequest.prototype = {
|
||||
__proto__: RESTRequest.prototype,
|
||||
|
||||
dispatch: function dispatch(method, data, onComplete, onProgress) {
|
||||
let contentType = "text/plain";
|
||||
if (method == "POST" || method == "PUT") {
|
||||
contentType = "application/json";
|
||||
}
|
||||
if (this.credentials) {
|
||||
let options = {
|
||||
now: this.now,
|
||||
localtimeOffsetMsec: this.localtimeOffsetMsec,
|
||||
credentials: this.credentials,
|
||||
payload: data && JSON.stringify(data) || "",
|
||||
contentType: contentType,
|
||||
contentType: "application/json; charset=utf-8",
|
||||
};
|
||||
let header = CryptoUtils.computeHAWK(this.uri, method, options);
|
||||
this.setHeader("Authorization", header.field);
|
||||
this._log.trace("hawk auth header: " + header.field);
|
||||
}
|
||||
|
||||
this.setHeader("Content-Type", contentType);
|
||||
|
||||
return RESTRequest.prototype.dispatch.call(
|
||||
this, method, data, onComplete, onProgress
|
||||
);
|
||||
|
@ -620,13 +620,6 @@ this.FxAccounts.prototype = Object.freeze({
|
||||
return internal.whenVerified(userData);
|
||||
},
|
||||
|
||||
now: function() {
|
||||
return internal.now();
|
||||
},
|
||||
|
||||
get localtimeOffsetMsec() {
|
||||
return internal.localtimeOffsetMsec;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sign the current user out.
|
||||
|
@ -194,11 +194,11 @@ this.BrowserIDManager.prototype = {
|
||||
* Provide override point for testing token expiration.
|
||||
*/
|
||||
_now: function() {
|
||||
return this._fxaService.now()
|
||||
return this._fxaService.internal.now()
|
||||
},
|
||||
|
||||
get _localtimeOffsetMsec() {
|
||||
return this._fxaService.localtimeOffsetMsec;
|
||||
return this._fxaService.internal.localtimeOffsetMsec;
|
||||
},
|
||||
|
||||
get account() {
|
||||
|
Loading…
Reference in New Issue
Block a user