Protocols/APIs and redirects

When we design APIs (XMLHttpRequest) and protocols (CORS) that support  
transparent redirects (redirects automatically followed by the API) what  
exactly should count as a redirect as far as they are concerned?  
Everything in the 3xx range that contains a Location header?

E.g. for some part of CORS we  
explicitly fail if the response code is 301, 302, 303, or 307, because we  
want the ability to support transparent redirects going forward. Should we  
also fail if the response code is 310?

follow redirects for status codes other than 301, 302, 303, and 307?  
Should it instead treat anything else as a network error so we can more  
easily extend it in the future? If we do not treat it as a network error  
the developer would just get back a response with a status code of 310 and  
the Location header and going forward we could never treat it as any of  
the "blessed redirects" anymore.

Aside: What happened to ? I  
could not find the issue.

Anne van Kesteren

Received on Tuesday, 6 December 2011 11:14:57 UTC