Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In gcm spec we should respect Retry-After header #94

Open
hypesystem opened this issue Feb 17, 2015 · 3 comments
Open

In gcm spec we should respect Retry-After header #94

hypesystem opened this issue Feb 17, 2015 · 3 comments

Comments

@hypesystem
Copy link
Collaborator

Originally by @ghominejad in #92 (but that contained several issues).

@ghominejad
Copy link

Retry-After is a response header. we can see it in some errors in the 500-599 range. it's a time that we must retry later after that.

https://developer.android.com/google/gcm/server-ref.html

@hypesystem
Copy link
Collaborator Author

Quoting the relevant section:

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. Application servers must implement exponential back-off.

@hypesystem
Copy link
Collaborator Author

Quoting the RFC:

The Retry-After response-header field can be used with a 503 (Service Unavailable) response to indicate how long the service is expected to be unavailable to the requesting client. This field MAY also be used with any 3xx (Redirection) response to indicate the minimum time the user-agent is asked wait before issuing the redirected request. The value of this field can be either an HTTP-date or an integer number of seconds (in decimal) after the time of the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants