Behaviour difference between libwww and browsers detecting 302 loops

Greg Stark (stark@generation.net)
21 Oct 1998 11:06:44 -0400


Libwww seems to be a bit more agressive than most browsers in
detecting 302 redirect loops. Specifically it treats URLs with
different search parameters as equivalent whereas browsers appear to
take into account the entire URL. So in the following instance libwww
will generate an error but browsers will display the page fine:

If there's some reason this behaviour is required then please at least
allow the common behaviour as an option.

Incidentally the error libwww generates in this case is a little
unclear, it generates "302 Found" as the error message. It might be
nice to generate the "Redirect loop detected" as the error message.

bash-2.01$ GET -S -U -e -d http://www.internetshopping.com/ 
GET http://www.internetshopping.com/default.asp?goto=/default.asp
User-Agent: lwp-request/1.33

GET http://www.internetshopping.com/ --> 302 Found
GET http://www.internetshopping.com/default.asp?goto=/default2.htm --> 302 Found
GET http://www.internetshopping.com/default.asp?goto=/default.asp --> 302 Found
Cache-Control: private
Connection: Keep-Alive
Date: Wed, 21 Oct 1998 14:53:36 GMT
Accept-Ranges: bytes
Location: /default.asp?goto=/default.asp
Server: WebSitePro/2.3.7
Content-Length: 151
Content-Type: text/html
Client-Date: Wed, 21 Oct 1998 14:52:43 GMT
Client-Peer: 194.93.128.43:80
Client-Warning: Redirect loop detected
Set-Cookie: ASPSESSIONID=ZFHSRTKJPPQEZIRE; path=/
Title: Object moved