Bug 844175 - Twitter stays on Connecting: Requesting user timelines... - follow-up to fix FileLink bustage, rs=mconley.
This commit is contained in:
Родитель
165f5f5a72
Коммит
14bd8d64f2
|
@ -59,8 +59,12 @@ function doXHRequest(aUrl, aHeaders, aPOSTData, aOnLoad, aOnError, aThis,
|
|||
});
|
||||
}
|
||||
|
||||
let POSTData = "";
|
||||
if (Array.isArray(aPOSTData)) {
|
||||
// aPOSTData can be:
|
||||
// - a string: send it as is
|
||||
// - an array of parameters: encode as form values
|
||||
// - null/undefined: no POST data.
|
||||
let POSTData = aPOSTData || "";
|
||||
if (Array.isArray(POSTData)) {
|
||||
xhr.setRequestHeader("Content-Type",
|
||||
"application/x-www-form-urlencoded; charset=utf-8");
|
||||
POSTData = aPOSTData.map(function(p) p[0] + "=" + encodeURIComponent(p[1]))
|
||||
|
|
|
@ -59,8 +59,12 @@ function doXHRequest(aUrl, aHeaders, aPOSTData, aOnLoad, aOnError, aThis,
|
|||
});
|
||||
}
|
||||
|
||||
let POSTData = "";
|
||||
if (Array.isArray(aPOSTData)) {
|
||||
// aPOSTData can be:
|
||||
// - a string: send it as is
|
||||
// - an array of parameters: encode as form values
|
||||
// - null/undefined: no POST data.
|
||||
let POSTData = aPOSTData || "";
|
||||
if (Array.isArray(POSTData)) {
|
||||
xhr.setRequestHeader("Content-Type",
|
||||
"application/x-www-form-urlencoded; charset=utf-8");
|
||||
POSTData = aPOSTData.map(function(p) p[0] + "=" + encodeURIComponent(p[1]))
|
||||
|
|
Загрузка…
Ссылка в новой задаче