Open Bug 1743078 Opened 3 years ago Updated 3 years ago

geolocation doesn't support data json anymore

Categories

(Core :: DOM: Geolocation, defect)

Firefox 94
defect

Tracking

()

UNCONFIRMED

People

(Reporter: leopold.freeman.0816, Unassigned)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

In about:config, set geo.provider.network.url to

data:application/json,{"location":{"lat":40.712776,"lng":-74.005974},"accuracy":100}
or
data:application/json,{"location":{"lat":40.712776,"lng":-74.005974,"accuracy":100}}

doesn't work anymore, no matter geo.provider.use_corelocation is true or not

I also set up a local server, and set the geo.provider.network.url to https://xxx.com/location, the server returns:
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Fri, 26 Nov 2021 07:29:54 GMT
< Content-Length: 62

{"location":{"lat":40.712776,"lng":-74.005974},"accuracy":100}

or
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Fri, 26 Nov 2021 07:52:23 GMT
< Content-Length: 62

{"location":{"lat":40.712776,"lng":-74.005974,"accuracy":100}}

doesn't work neither

Actual results:

In console, navigator.geolocation.getCurrentPosition(p=>console.log(p)) always prints my real location, not the one I specified.

Expected results:

getCurrentPosition should return the location I specified in json

Has Regression Range: --- → no
Has STR: --- → yes
Component: Untriaged → DOM: Geolocation
Keywords: regression
Product: Firefox → Core
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.