--You received this message because you are subscribed to the Google Groups "android-gcm" group.To view this discussion on the web visit https://groups.google.com/d/msg/android-gcm/-/Z7nq6JZUT0sJ.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-gcm...@googlegroups.com.
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.
Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds )
Two examples of its use are
Retry-After: Fri, 31 Dec 1999 23:59:59 GMT Retry-After: 120
In the latter example, the delay is 2 minutes.
CURLOPT_RETURNTRANSFER = true
CURLOPT_HEADER = true
--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-gcm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/android-gcm/-/xhrZ3XTTfrIJ.
For more options, visit https://groups.google.com/groups/opt_out.
1. Do I need to honor the Retry-After header on each retry, or is it just on the first retry, then exponentially back off?
2. Do I need to combine the Retry-After with the exponential backoff, or does the Retry-After value trump the backoff value?
3. Will Retry-After always be sent with an 'Unavailable'/'InternalServerError', or is it just sometimes?
Thanks Trevor. I'm working on a php framework, and there's no built-in library for dealing with http headers. I can install some PECL library for dealing with it, but I've opted to use a modified parsing function that I've gleaned off the internet, rather than force the entire development team to install a large library locally as well as on the server just to deal with one simple operation.I need a little more clarity on exactly how timeouts should be handled. If I'm understanding correctly, I need to examine my http response body and determine if there are any errors of the type 'Unavailable' or 'InternalServerError'. If so, I need to examine the http response header and determine if there is a Retry-After. If there is, I need to determine either from the timestamp or the number of seconds how long I need to wait before making another attempt. On that successive attempt, I also need to back off exponentially from the previous attempt.Questions:
1. Do I need to honor the Retry-After header on each retry, or is it just on the first retry, then exponentially back off?
2. Do I need to combine the Retry-After with the exponential backoff, or does the Retry-After value trump the backoff value?
3. Will Retry-After always be sent with an 'Unavailable'/'InternalServerError', or is it just sometimes?
--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-gcm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/android-gcm/-/J8KwaFa0BZEJ.
For more options, visit https://groups.google.com/groups/opt_out.