[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Bug#23382: reload on a page returning different mimetype
From:       leonb () research ! att ! com
Date:       2001-03-31 2:50:57
[Download RAW message or body]

Package: khtml
Version: 3.0 (using KDE 2.1.9 >= 20010310)
Severity: normal
Installed from:    compiled sources
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.0)
OS:                Linux 2.4.2 i686
OS/Compiler notes: 


Go to the following page:
http://djvuserver.research.att.com/~leonb/test/fun.cgi
This cgi script randomly returns either
a gif image or a html page showing
the text of the script.

The first time, you might see the html
or the gif image.  Nevertheless, keep
pressing the RELOAD button until this 
changes.  

PROBLEM: konqueror does not realize that
the mimetype is changed and that it
should activate a different part.

Therefore if you get the html the first time,
you see garbage when it is time to see the
image.  And conversely!

In the case of KHTML, this is happening
in the last lines of  urlSelected(), where
the part calls its own openURL function
instead of going back to the browser
openURLRequest function.

But this is also happening with kview,
as you can see when you get the GIF
the first time. 

I have seen this bug on CGI scripts that 
provide feedback to the user using a 
meta refresh (similar to a reload).  
It took me quite a while to produce 
a usable case ...

One cannot assume that a reload
will always produce the same mimetype.

Especially when the response explicitely
says that the data cannot be cached
(Cache-Control: no-cache).

Disgression: Legacy browsers :) always
disable caching when the URL contains
stuff like  "/cgi-bin/" or  ".cgi?..." or
finish with ".cgi".  This is of course
extremly ad-hoc, but many scripts around
rely on this behavior...

Leon Bottou.


(Submitted via bugs.kde.org)
(Called from KBugReport dialog)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic