Closed Bug 948513 Opened 11 years ago Closed 10 years ago

API should have explicit GeoIP header

Categories

(Marketplace Graveyard :: API, defect, P3)

Avenir
x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED WONTFIX
2014-01-14

People

(Reporter: basta, Assigned: mat)

References

Details

Right now we pull the geoip data from `API-Filter`, which isn't ideal because it doesn't give us any data if a region isn't returned.

Instead, there should be some header like `API-Geo` which contains a value like the following:

- error: GeoIP was attempted but the lookup failed.
- worldwide: No region could be detected based on the location.
- us: The user was detected to be in the US

The absence of the API-Geo header should indicate that no GeoIP lookup was performed and the client should take no action.
Depends on: 948560
Priority: -- → P3
Assignee: nobody → mpillard
The region middleware also tries to guess the region from the Accept-Language header if geoip lookup returned 'worldwide'. In that case, should we return whatever region we ended up after geoip, or just the 'worldwide' we got from geoip ?
Flags: needinfo?(mattbasta)
Status: NEW → ASSIGNED
Thar be dragons. Either remove that code or make it transparent. I wasn't even aware that we were still doing that in the API.
Flags: needinfo?(mattbasta)
Neither was I. Over the break, can we statsd log the frequency of incidents where we assign a region via SIM, IP, and language? It'd be interesting to see how frequently each of those happen.
Over the break? Krupa won't be testing.
Commit the logging today, cherry-pick it, investigate results on 1/3.
We already log this information, have been for a while.
statsd.incr('z.regions.middleware.source.url')
statsd.incr('z.regions.middleware.source.geoip')
statsd.incr('z.regions.middleware.source.accept-lang')
Target Milestone: --- → 2014-01-14
While not strictly a duplicate, bug 964524 (and the consumer pages side bug 966335) make this obsolete.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.