Last Comment Bug 545001 - NetworkGeolocationProvider should support HELD protocol
: NetworkGeolocationProvider should support HELD protocol
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Geolocation (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: mozilla1.9.3a2
Assigned To: Doug Turner (:dougt)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-08 14:51 PST by Richard Barnes [:rbarnes]
Modified: 2013-01-01 06:32 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch to enable HELD (with JSON left as default) (8.23 KB, patch)
2010-02-08 14:57 PST, Richard Barnes [:rbarnes]
no flags Details | Diff | Splinter Review
patch v.2 (8.81 KB, patch)
2010-02-08 18:47 PST, Doug Turner (:dougt)
no flags Details | Diff | Splinter Review
patch v.3 (8.37 KB, patch)
2010-02-08 23:20 PST, Doug Turner (:dougt)
no flags Details | Diff | Splinter Review
patch v.3 w/ comment about HELD (8.49 KB, patch)
2010-02-08 23:23 PST, Doug Turner (:dougt)
doug.turner: review+
Details | Diff | Splinter Review
Patch v.4 with greatly improved HELD support (24.12 KB, patch)
2010-08-19 22:05 PDT, Richard Barnes [:rbarnes]
no flags Details | Diff | Splinter Review

Description Richard Barnes [:rbarnes] 2010-02-08 14:51:13 PST
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.
Comment 1 Reed Loden [:reed] (use needinfo?) 2010-02-08 14:52:34 PST
Doesn't look like the patch was attached...
Comment 2 Richard Barnes [:rbarnes] 2010-02-08 14:57:22 PST
Created attachment 425874 [details] [diff] [review]
Patch to enable HELD (with JSON left as default)
Comment 3 Doug Turner (:dougt) 2010-02-08 18:47:55 PST
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
Comment 4 Richard Barnes [:rbarnes] 2010-02-08 20:53:31 PST
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
Comment 5 Doug Turner (:dougt) 2010-02-08 23:20:54 PST
Created attachment 425943 [details] [diff] [review]
patch v.3

white space cleanup.
Comment 6 Doug Turner (:dougt) 2010-02-08 23:23:12 PST
Created attachment 425944 [details] [diff] [review]
patch v.3 w/ comment about HELD
Comment 7 Doug Turner (:dougt) 2010-02-11 12:04:45 PST
http://hg.mozilla.org/mozilla-central/rev/8a8a29dc6c98
Comment 8 Richard Barnes [:rbarnes] 2010-08-19 22:05:32 PDT
Created attachment 467679 [details] [diff] [review]
Patch v.4 with greatly improved HELD support

Patch v.4 with greatly improved HELD support
Comment 9 Richard Barnes [:rbarnes] 2010-08-19 22:08:39 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.