(*** This bug was imported into bugs.kde.org ***) Package: konqueror Version: 2.2 (using KDE 2.2.0 ) Severity: wishlist Installed from: SuSE Compiler: gcc version 2.95.2 19991024 (release) OS: Linux (i686) release 2.4.0-4GB OS/Compiler notes: Konqueror does not support the http header: Content-Disposition: attachment. I don't know if this is a standard or not but msie presents the user with a 'save file' window when this http header is present in the response of the webserver. This way you can present the user with a save link even for formats that are usually displayed by the browser (html text etc). Thanks! Andrej (Submitted via bugs.kde.org) (Called from KBugReport dialog)
On Monday 27 August 2001 08:16 andrej@redwood.nl wrote: > Package: konqueror > Version: 2.2 (using KDE 2.2.0 ) > Severity: wishlist > Installed from: SuSE > Compiler: gcc version 2.95.2 19991024 (release) > OS: Linux (i686) release 2.4.0-4GB > OS/Compiler notes: > > Konqueror does not support the http header: Content-Disposition: > attachment. I don't know if this is a standard or not but msie presents > the user with a 'save file' window when this http header is present in the > response of the webserver. This way you can present the user with a save > link even for formats that are usually displayed by the browser (html > text etc). > > Thanks! Hi Andrej We do support Content-Disposition. If it does not work then it must be a bug somewhere. Do you have a link for a site where this happens ? Regards Dawit A.
Dawit Alemayehu wrote: > On Monday 27 August 2001 08:16 andrej@redwood.nl wrote: > >>Package: konqueror >>Version: 2.2 (using KDE 2.2.0 ) >>Severity: wishlist >>Installed from: SuSE >>Compiler: gcc version 2.95.2 19991024 (release) >>OS: Linux (i686) release 2.4.0-4GB >>OS/Compiler notes: >> >>Konqueror does not support the http header: Content-Disposition: >>attachment. I don't know if this is a standard or not but msie presents >>the user with a 'save file' window when this http header is present in the >>response of the webserver. This way you can present the user with a save >>link even for formats that are usually displayed by the browser (html >>text etc). >> >>Thanks! >> > > Hi Andrej > > We do support Content-Disposition. If it does not work then it must be a > bug somewhere. Do you have a link for a site where this happens ? > > Regards > Dawit A. > Hi The page is on our intranet so I can't give you a link. :-( Here are the headers as displayed using lynx: HTTP/1.0 200 OK Content-Type: text/html; charset=ISO-8859-1 Cache-Control: no-store Pragma: no-cache Expires: Thu 01 Jan 1970 00:00:00 GMT Content-Disposition: attachment Servlet-Engine: Tomcat Web Server/3.2.2 (JSP 1.1; Servlet 2.2; Java 1.3.0; Linux 2.4.0-4GB x86; java.vendor=IBM Corporation) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <snip> Konqueror displays this page in the browser no save file window is displayed. Regards Andrej
On Friday 31 August 2001 10:16 Andrej Koelewijn wrote: > Dawit Alemayehu wrote: > > On Monday 27 August 2001 08:16 andrej@redwood.nl wrote: > >>Package: konqueror > >>Version: 2.2 (using KDE 2.2.0 ) > >>Severity: wishlist > >>Installed from: SuSE > >>Compiler: gcc version 2.95.2 19991024 (release) > >>OS: Linux (i686) release 2.4.0-4GB > >>OS/Compiler notes: > >> > >>Konqueror does not support the http header: Content-Disposition: > >>attachment. I don't know if this is a standard or not but msie presents > >>the user with a 'save file' window when this http header is present in > >> the response of the webserver. This way you can present the user with a > >> save link even for formats that are usually displayed by the browser > >> (html text etc). > >> > >>Thanks! > > > > Hi Andrej > > > > We do support Content-Disposition. If it does not work then it must be a > > bug somewhere. Do you have a link for a site where this happens ? > > > > Regards > > Dawit A. > > Hi > The page is on our intranet so I can't give you a link. :-( > Here are the headers as displayed using lynx: > > HTTP/1.0 200 OK > Content-Type: text/html; charset=ISO-8859-1 > Cache-Control: no-store > Pragma: no-cache > Expires: Thu 01 Jan 1970 00:00:00 GMT > Content-Disposition: attachment > Servlet-Engine: Tomcat Web Server/3.2.2 (JSP 1.1; Servlet 2.2; Java > 1.3.0; Linux 2.4.0-4GB x86; java.vendor=IBM Corporation) > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > > <snip> > > Konqueror displays this page in the browser no save file window is > displayed. > > Regards Hi Andrej Ehh... the file-name paramter is missing from the Content-Disposition field or did you purposefully cut it out ? Anyways I still have to check is whether or not we prompt the user with the "Save As" dialog for html content even when the Content -Disposition: field is present. That is probably what is causing this issue. Regards Dawit A.
I confirm it doesn't work. It is quite a problem when you have binary data stored within a database: you can use the content-disposition header field to force a "save as/open with" window, and provide a name for the file to be saved/opened. Mozilla handles it correctly: it prompts just what I'd expect. Konqueror just ignores it, both with binary and plain text files: if I remove the header, it just behaves the same. I'm using mandrake cooker's kde 3.1. Daniele
Actually, it seems as the header is correctly interpreted, but not used: for example, I get this prompt for saving a file stored within the DB (I used an extension unknown to the system): Open "http://127.0.0.1/~...unti.php?paperId=7" (7_testfile.xcgh)? "7_testfile.xcgh" being the name I've forced via the header. Still, when I hit "save as", the displayed name is not "7_testfile.xcgh", but "visualizzaAppunti.php", which is the name of the script that set the header and extracted the contents of the file from the dbms. Anyhow, on known filetypes I should be prompted as well, while the default handler is silently used. Daniele
*** Bug 55775 has been marked as a duplicate of this bug. ***
This bug has been fixed in the current CVS version. The content dispostion header is now properly used when you are prompted to save the file. Also for the most part you get prompted to open or save the file even if the file type is known with some exceptions, e.g. non-compressed text and image files.
Actually this never worked correctly, and doesn't work at all now.
SVN commit 518811 by carewolf: Handle content-disposition: attachment in HTTP-headers. Regression BUG: 31662 M +6 -3 kdebase/konqueror/konq_mainwindow.cc M +5 -4 kdebase/konqueror/konq_run.cc M +21 -12 kdelibs/kioslave/http/http.cc M +11 -4 kdelibs/kparts/browserrun.cpp M +16 -6 kdelibs/kparts/browserrun.h