Version: (using KDE KDE 3.5.7) Installed from: Debian testing/unstable Packages OS: Linux For some reason, when opening a page with the following javascript included in the html head: http://www.welmers.net/~bastiaan/XmlHttpRequest.js and with body tag: <body onunload="loadXMLDoc('/deletelock.php?item=XXX');"> and submitting a <form method="POST"> it happens that konqueror seems to POST the page _twice_, one before the XMLHttpRequest en one time after, according to the server logs: ::1 - - [12/Dec/2007:11:11:29 +0100] "POST /lid.php HTTP/1.1" 200 1031 "http://localhost/lid.php" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko) (Debian)" ::1 - - [12/Dec/2007:11:11:29 +0100] "GET /deletelock.php?item=XXX HTTP/1.1" 200 - "http://localhost/lid.php" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko) (Debian)" ::1 - - [12/Dec/2007:11:11:29 +0100] "POST /lid.php HTTP/1.1" 200 9245 "http://localhost/lid.php" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko) (Debian)" As far as I know, a browser should never POST an item twice without permission of the user...
The title of this bug is wrong: it states "onload", it should be "onunload", so it's about the onunload event triggered when exiting the html page.
The following example will trigger the bug: http://www.welmers.net/~bastiaan/konqueror_xmlhttprequest_bug.html It should be installed on your own web server (so you can see the server logs, or use a traffic sniffer) with the following files: http://www.welmers.net/~bastiaan/XmlHttpRequest.js http://www.welmers.net/~bastiaan/XmlHttpRequest.txt
Confirmed using konqueror svn trunk 831729
Are you sure the query is send twice? KIO has a feature where it loads the first few bytes of a request to detect the mime-type using MAGIC, and then it issues a new request to load the rest. I am not sure if this is done for POST, but it is done for GET and could be what you are seeing.
Message from the Bugsquad and Konqueror teams: This bug is closed as outdated, as we do not have the manpower to maintain the KDE3 version anymore. If you still can reproduce this issue with Konqueror 4.8.4 or later, please open a new report. Thank you for your understanding.