NetworkGeolocationProvider should support HELD protocol

RESOLVED FIXED in mozilla1.9.3a2

Status

()

Core
Geolocation
--
enhancement
RESOLVED FIXED
8 years ago
5 years ago

People

(Reporter: rbarnes, Assigned: dougt)

Tracking

Trunk
mozilla1.9.3a2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6

This patch adds support for the IETF HELD location protocol as an option, controlled by the "geo.wifi.protocol" preference:
geo.wifi.protocol = 0  <-------- Google JSON protocol (current, default)
geo.wifi.protocol = 1  <-------- HELD
A test server that translates HELD to Google queries can be used by setting
geo.wifi.uri = http://geopriv.dreamhosters.com/cgi-bin/lis_gears.pl

Reproducible: Always

Steps to Reproduce:
1. Apply attached patch and install NetworkGeolocationProvider.js
2. Set geo.wifi.protocol = 0
3. Set geo.wifi.uri = https://www.google.com/loc/json/
4. Set loc1 = [location provided by navigator.geolocation.getCurrentPosition()]
5. Set geo.wifi.protocol = 1
6. Set geo.wifi.uri = http://geopriv.dreamhosters.com/cgi-bin/lis_gears.pl
7. Set loc2 = [location provided by navigator.geolocation.getCurrentPosition()]


Expected Results:  
The JSON-derived result loc1 should be equal to the HELD-derived result loc2.
Doesn't look like the patch was attached...
(Reporter)

Comment 2

8 years ago
Created attachment 425874 [details] [diff] [review]
Patch to enable HELD (with JSON left as default)
Attachment #425874 - Flags: review?(mozbugz)
Component: General → Geolocation
Product: Firefox → Core
QA Contact: general → geolocation
Assignee: nobody → richard.barnes
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Comment 3

8 years ago
Created attachment 425920 [details] [diff] [review]
patch v.2

Richard, I took your patch and fixed a few nits.  Please verify these changes.

A couple other things -- can you post the source to the "server".  This would help mozilla qa be able to setup their own server for verification.

I removed the comments of the HELD document from the source.  I felt it didn't add much value above what a simple google search would provide.  However, maybe we should comment a URL.  Would this work?

http://tools.ietf.org/html/draft-thomson-geopriv-held-get-00
Attachment #425874 - Attachment is obsolete: true
Attachment #425874 - Flags: review?(mozbugz)
(Reporter)

Comment 4

8 years ago
Those changes look fine to me.  

The code to the server can be downloaded here:
http://geopriv.dreamhosters.com/mozilla-held/lis_gears.this_is_not_pl.txt
Just change ".this_is_not_pl.txt" to ".pl" and run as a CGI script.

Best reference is probably this one (which explains the wifi bits):
http://tools.ietf.org/html/draft-thomson-geopriv-held-measurements
The base protocol is here:
http://tools.ietf.org/html/draft-ietf-geopriv-http-location-delivery
(Assignee)

Comment 5

8 years ago
Created attachment 425943 [details] [diff] [review]
patch v.3

white space cleanup.
Assignee: richard.barnes → mozbugz
Attachment #425920 - Attachment is obsolete: true
(Assignee)

Comment 6

8 years ago
Created attachment 425944 [details] [diff] [review]
patch v.3 w/ comment about HELD
Attachment #425943 - Attachment is obsolete: true
(Assignee)

Updated

8 years ago
Attachment #425944 - Flags: review+
(Assignee)

Comment 7

8 years ago
http://hg.mozilla.org/mozilla-central/rev/8a8a29dc6c98
(Assignee)

Updated

8 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Blocks: 467530
Target Milestone: --- → mozilla1.9.3a2
Version: unspecified → Trunk
(Reporter)

Comment 8

7 years ago
Created attachment 467679 [details] [diff] [review]
Patch v.4 with greatly improved HELD support

Patch v.4 with greatly improved HELD support
(Reporter)

Comment 9

7 years ago
Test cases for the improved HELD decoder here:
<http://geopriv.dreamhosters.com/mozilla-test-cases/>
Just set geo.wifi.uri to point to any of the XML files.

Updated

5 years ago
No longer blocks: 467530
You need to log in before you can comment on or make changes to this bug.