dougt/MozStumbler — pull request #36 by cpeterso (2013-07-26 06:34:58+00:00)
Title: Add X-Token and X-Nickname request headers

@hannosch recommends (in mozilla/ichnaea#9) replacing our `token` JSON property with `X-Token` and `X-Nickname` request headers.

1. This PR adds an `X-Token` header without removing the `token` JSON property. We can remove the JSON property after the server understands `X-Token` headers. This should allow users to upgrade to new client versions without losing their token (and score). The server may want to continue looking for both to ensure for a short period to avoid losing tokens for laggards who have not upgraded their clients.

2. This PR adds an `X-Nickname` header but does not add any UI to read or write the nickname! That is issue #18. As a temporary hack, I generate a semi-unique but personally recognizable nickname by concatenating the user's device model and Android OS version. For example, my generated nickname is "Nexus 4 (Android 4.2.2)".