mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 713991 - Geolocation fails when used with large number of access points. r=gmealer
This commit is contained in:
parent
3ef0679ab6
commit
34c8a90042
@ -218,17 +218,19 @@ WifiGeoPositionProvider.prototype = {
|
|||||||
|
|
||||||
if (accessPoints) {
|
if (accessPoints) {
|
||||||
providerUrl = providerUrl + accessPoints.sort(sort).map(encode).join("");
|
providerUrl = providerUrl + accessPoints.sort(sort).map(encode).join("");
|
||||||
// max length is 2k. make sure we are under that
|
|
||||||
let x = providerUrl.length - 2000;
|
|
||||||
if (x >= 0) {
|
|
||||||
// we need to trim
|
|
||||||
let doomed = providerUrl.lastIndexOf("&", 2000);
|
|
||||||
LOG("Doomed:"+doomed);
|
|
||||||
providerUrl = providerUrl.substring(0, doomed);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
providerUrl = encodeURI(providerUrl);
|
providerUrl = encodeURI(providerUrl);
|
||||||
|
|
||||||
|
// max length is 2k. make sure we are under that
|
||||||
|
let x = providerUrl.length - 2000;
|
||||||
|
if (x >= 0) {
|
||||||
|
// we need to trim
|
||||||
|
let doomed = providerUrl.lastIndexOf("&", 2000);
|
||||||
|
LOG("Doomed:"+doomed);
|
||||||
|
providerUrl = providerUrl.substring(0, doomed);
|
||||||
|
}
|
||||||
|
|
||||||
LOG("************************************* Sending request:\n" + providerUrl + "\n");
|
LOG("************************************* Sending request:\n" + providerUrl + "\n");
|
||||||
|
|
||||||
// send our request to a wifi geolocation network provider:
|
// send our request to a wifi geolocation network provider:
|
||||||
|
Loading…
Reference in New Issue
Block a user