pushmeup
pushmeup copied to clipboard
GCM should return the headers on build_response method
GCM requires to use the 'Retry-After' header in case of error, and the gem return the headers only when the response code is 200
In addition: the gem support only 500 and 503 response code and in case the response code is 5xx (like 502..) - the gem return nil instead of the response.
see GCM documentation: http://developer.android.com/google/gcm/server-ref.html "5xx Errors in the 500-599 range (such as 500 or 503) indicate that there was an internal error in the GCM server while trying to process the request, or that the server is temporarily unavailable (for example, because of timeouts). Sender must retry later, honoring any Retry-After header included in the response..."