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...
Created attachment 425874 [details] [diff] [review] Patch to enable HELD (with JSON left as default)
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
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
Created attachment 425943 [details] [diff] [review] patch v.3 white space cleanup.
Created attachment 425944 [details] [diff] [review] patch v.3 w/ comment about HELD
Created attachment 467679 [details] [diff] [review] Patch v.4 with greatly improved HELD support Patch v.4 with greatly improved HELD support
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.