Bug 143561 - redirect to incomplete URL causes infinite loop
Summary: redirect to incomplete URL causes infinite loop
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 18:53 UTC by Jonathan Marten
Modified: 2008-04-21 10:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Marten 2007-03-28 18:53:01 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Compiled From Sources
Compiler:          gcc version 4.1.1 (Gentoo 4.1.1-r3)
 
OS:                Linux

Going to http://www.nominet.org.uk/go/replyform returns a redirection page as follows:

HTTP/1.1 200 OK
Date: Wed, 28 Mar 2007 16:35:28 GMT
Server: Apache/2.0.48 (Unix) mod_ssl/2.0.48 OpenSSL/0.9.7c mod_jk/1.2.12
Set-Cookie: JSESSIONID=32AA689366810FF77ED9229C3EDEE5CD; Path=/
Connection: close
Content-Type: text/html;charset=utf-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>URL Redirect</title>

    <script language="JavaScript1.1">
      <!--
        location.replace("/registrants/maintain/changedetails/online/");
      //-->
    </script>

    <noscript>
      <meta http-equiv="Refresh" content="0; URL="/registrants/maintain/changedetails/online/" />
    </noscript>
  </head>

  <body>
    <p>You should automatically be redirected to the new page. If not, please click <a href="/registrants/maintain/changedetails/online/">here</a>.</p>
  </body>
</html>

With JS enabled, the page redirects correctly.  But with JS disabled, so that the http-equiv="Refresh" takes effect, Konq loops indefinitely fetching the /go/replyform page.

Admittedly the redirect is not done properly (which doesn't give one confidence in the UK's main domain name registrar :-).  Although the "Refresh" header is not specified in any RFC, its original specification http://wp.netscape.com/assist/net_sites/pushpull.html says that "make sure the URL you give is fully qualified" and here it is not.  But visiting such a page should not put the browser into an infinite loop.
Comment 1 Maksim Orlovich 2007-03-28 20:39:57 UTC
The problem isn't the relative URL, I think: it's the miss-quoting. Disabling following of redirects, and JS, this is what the attribute 'content' of the <meta> is as parsed as:
0; URL=

.. and then there is an attribute named /registrants/maintain/changedetails/online/"
Comment 2 Christophe Marin 2008-04-20 14:39:37 UTC
The issue cannot be reproduced in KDE4 trunk (r. 799086). The site is redirected.

Note that the redirect page has been changed to : /registrants/maintain/onlineservices/
Comment 3 Christophe Marin 2008-04-20 14:41:43 UTC
Mmh.. My bad, their website is still looping when js is disabled.
Comment 4 George Goldberg 2008-04-21 10:41:20 UTC
Konqueror does what the HTML tells it, so I don't think this can be fixed.