bool IsRedirection (HttpWebResponseCore response)
{
// FIXME - there's likely a maximum number of redirection allowed because throwing an exception
switch ((int) response.RealStatusCode) {
case 301: // Moved Permanently, RFC2616 10.3.2
// Silverlight always redirect (i.e. not just POST requests)
case 302: // Found, RFC2616 10.3.3
// main one used by ASP/ASPX Redirect
case 303: // See Other, RFC2616 10.3.4
case 304: // Not Modified, RFC2616 10.3.5
case 305: // Use Proxy, RFC2616 10.3.7
case 307: // Temporaray Redirect, RFC2616 10.3.8
// see DRT 867
return true;
default:
return false;
}
}