return HttpStatusCode.ServiceUnavailable in the context.context.Response.StatusCode (Http response c

  • Thread starter Thread starter Flip Rayner
  • Start date Start date
F

Flip Rayner

I am writing an HTTPHandler that is basically a transparent proxy / URL
Mapper.

I have a line in my code to return a 503:
context.context.Response.StatusCode =
(int)HttpStatusCode.ServiceUnavailable;

I am lead to believe that there is the ability to specify the
"retry-after" parameter in the header, but I am unsure how to do it in
..Net2


From: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
"The server is currently unable to handle the request due to a temporary
overloading or maintenance of the server. The implication is that this is
a temporary condition which will be alleviated after some delay. If known,
the length of the delay MAY be indicated in a Retry-After header. If no
Retry-After is given, the client SHOULD handle the response as it would
for a 500 response."

Does anyone know how to specify the length of delay in the "retry-after"
header using .Net2 / C#?
 
Back
Top