]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[http] Automatically retry request on a 503 Service Unavailable
authorMichael Brown <mcb30@ipxe.org>
Fri, 7 Mar 2014 17:19:36 +0000 (17:19 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 7 Mar 2014 17:32:26 +0000 (17:32 +0000)
commit42bf3b9aa949f5b53eeb164a4a405822a7038a0e
tree252788d68ddc8b679ea3739f4fcf8ab50855854a
parent0d657b8e944c1d126fe2dfc07d808818a31bc270
[http] Automatically retry request on a 503 Service Unavailable

A web server may return a 503 Service Unavailable response along with
a Retry-After header to direct the client to retry the request at a
later time.

The Retry-After header may be a number of seconds, or a full HTTP
timestamp (e.g. "Fri, 7 Mar 2014 17:22:14 GMT").  We have no
reasonable way of parsing a full HTTP timestamp; if the server chooses
to use this format then we simply retry after a fixed 5-second delay.

As per RFC 2616, in the absence of a Retry-After header we treat a
status code of 503 Service Unavailable as being equivalent to 500
Internal Server Error, and immediately fail the request.

Requested-by: Suresh Sundriyal <ssundriy@vmware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/tcp/httpcore.c