ecma/kjs_window.cpp Window::goURL

Koos Vriezen koos.vriezen at xs4all.nl
Sat Jan 10 23:29:31 GMT 2004


On Sat, Jan 10, 2004 at 11:35:15PM +0100, David Faure wrote:
> On Saturday 10 January 2004 22:49, Koos Vriezen wrote:
> > On Sat, Jan 10, 2004 at 10:32:58PM +0100, David Faure wrote:
> > > On Saturday 10 January 2004 21:32, Koos Vriezen wrote:
> > > > Hi,
> > > > 
> > > > Window::goURL does not do 'location.href = location.href' for a reload. Couldn't
> > > > find where this was added in the cvs logs, but
> > > > // Check if the URL is the current one. No [infinite] redirect in that case
> > > > suggest it fixes something, but it breaks "Luister Live" on http://www.radio1.be.
> > > > (See #72304 for the application)
> > > 
> > > cvs ann -r1.286 kjs_window.cpp | grep infinite
> > > 1.270        (faure    30-Jul-02):           // Check if the URL is the current one. No [infinite] redirect in that case.
> > > 
> > > cvs log -r1.270 kjs_window.cpp
> > > Fix for location='url', infinitely looping on https://start.telebank.co.il
> > 
> > Fix breaks compatibility with other browsers
> > 
> > <html><body onLoad='alert("hi")' onClick='location.href=location.href'></body></html>
> > 
> > see the difference with mozilla (and most probably ie too)  and konqueror.
> > 
> > Indeed mozilla hangs on
> > <html><body onLoad='location.href=location.href'></body></html>
> > but konqueror doesn't make much of https://start.telebank.co.il either ...
> > 
> > Anyway, we can't ignore side effects of eg cookies and assume reopening the same
> > url is pointless.
> 
> If you've tested the other browsers on this issue, feel free to change KHTML. 

Just tested with IE5.0 (thanks to ssh tunnel and VNC :-), same as mozilla.
Simple fix attached

Koos
-------------- next part --------------
Index: kjs_window.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/ecma/kjs_window.cpp,v
retrieving revision 1.363
diff -u -3 -p -r1.363 kjs_window.cpp
--- kjs_window.cpp	25 Nov 2003 12:03:02 -0000	1.363
+++ kjs_window.cpp	10 Jan 2004 23:23:09 -0000
@@ -1057,9 +1057,6 @@ void Window::goURL(ExecState* exec, cons
     partURL.setRef( QString::null );
     kdDebug(6070) << "Window::goURL dstUrl=" << dst.prettyURL() << " partURL=" << partURL.prettyURL()
                    << " identical: " << partURL.equals( dst, true ) << endl;
-    // Check if the URL is the current one. No [infinite] redirect in that case.
-    if ( partURL.equals( dst, true ) )
-        return;
 
     // check if we're allowed to inject javascript
     // SYNC check with khtml_part.cpp::slotRedirect!


More information about the kfm-devel mailing list