Bug 62209 - konqueror sends some http requests twice
Summary: konqueror sends some http requests twice
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-05 21:44 UTC by Marek Janda
Modified: 2003-08-05 22:16 UTC (History)
0 users

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 Marek Janda 2003-08-05 21:44:17 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice) 
OS:          Linux

I try to do script in PHP, that will read some file, send it to the browser and delete it afterwards. It looks like this:

if (file_exists('file')) {
   header("Content-type: octet/stream");
   header("Content-Disposition: attachment; filename=".$file['name']);
   readfile('file');
   unlink('file');
} else {
   // redirect to "page X"
}

...when I try it in Konqueror, it shows the "Save As" dialog and then it saves content of "page X" to the file. I looked into the logs and it seems like two requests were sent and content of the file was html of the page, it redirects to when no file is found (original file was deleted after the first request).

Logs from apache:
127.0.0.1 - - [05/Aug/2003:19:12:39 +0200] "GET /path/to/index.php?l=args HTTP/1.1" 200 207708 "-" "Mozilla/5.0 (compatible; Konqueror/3.1; Linux)"
127.0.0.1 - - [05/Aug/2003:19:12:40 +0200] "GET /path/to/index.php?l=args HTTP/1.1" 302 5 "-" "Mozilla/5.0 (compatible; Konqueror/3.1; Linux)"

I use recent -cvs version of kdelibs/kdebase and haven't tested it in any other version of Konq. In Mozilla, IE and Links2 it works as expected.
Comment 1 Marek Janda 2003-08-05 22:16:32 UTC
Tried to make some sample script to reproduce the bug, but wasn't able to do so.
And even the script, I had this problem previously, is working ok now.