Re: how to prevent the infinite http redirection

On Tue, 25 Jan 2000, Tu Yu-Guang wrote:

> 
> > Hi,
> >
> > If I use http redirection "302" to redirect the http request among a group
> > of web servers, how to prevent the infinite loop? Does the library or the
> > http specification provide some interface to record the redirection route?

302 means "Found" with no more information about the time it will be
valid. 301 (Moved Permanently) and 307 (Moved temporarily) are preferred,
but some browser are not supporting 307 well :(

Regarding redirections:
RFC2616: 10.3
 A client SHOULD detect infinite redirection loops, since such loops 
 generate network traffic for each redirection.

And:
   Note: previous versions of this specification recommended a
   maximum of five redirections. Content developers should be aware
   that there might be clients that implement such a fixed
   limitation.

Browsers are aware of that, no idea concerning some badly broken spiders
that may unfortunately exist.
Regards,

      /\          - Yves Lafon - World Wide Web Consortium - 
  /\ /  \        Architecture Domain - Jigsaw Activity Leader
 /  \    \/\    
/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    

Received on Tuesday, 25 January 2000 05:12:22 UTC