Bug 18727 - XML response without Content-Type triggers strange download behavior
Summary: XML response without Content-Type triggers strange download behavior
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-24 19:23 PDT by Yuen Ho Wong
Modified: 2008-04-25 09:53 PDT (History)
2 users (show)

See Also:


Attachments
Test war file (2.31 KB, application/octet-stream)
2008-04-24 20:27 PDT, Yuen Ho Wong
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuen Ho Wong 2008-04-24 19:23:16 PDT
Basically, if the web server for what ever reason returns an XML file without specifying a content type header, Safari will somehow decide to "download" that "file" and create a file called Desktop-1 under /Users and a folder with the same name under my home directory. This behavior also causes Eclipse to crash when Webkit is embedded.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=228722.
Comment 1 Mark Rowe (bdash) 2008-04-24 19:47:02 PDT
Can you please provide a test case that demonstrates this issue?  Which version of WebKit does the problem occur with?
Comment 2 Yuen Ho Wong 2008-04-24 20:27:13 PDT
Created attachment 20805 [details]
Test war file
Comment 3 Yuen Ho Wong 2008-04-24 20:27:59 PDT
This problem exists on Safari 3.1.1 and the latest Webkit nightly build.

I've supplied a JavaEE war file for the test. Just drop the file under the webapps directory under a vanilla Tomcat 5.5 and start the server by invoking "bin/catalina.sh start" and then just fire up Safari to browse to http://localhost:8080/Test18727/.
Comment 4 Mark Rowe (bdash) 2008-04-24 20:30:09 PDT
Can you possibly provide a web-accessible example?  I doubt many WebKit developers know anything about working with Tomcat.
Comment 5 Yuen Ho Wong 2008-04-24 20:43:01 PDT
I don't have a public server with Tomcat running that I can play with. The trick is to somehow generate a response header with no Content-Type, and that the data is XML. There may be some Apache tricks that can give you that but I'm not too familiar with Apache.

Tomcat is simple, all you have to do is to download it from tomcat.apache.org, extract it, drop the war file under "webapps" and fire up the server by issuing "$TOMCAT_DIR/bin/catalina.sh start". When you are done, just issue "$TOMCAT_DIR/bin/catalina.sh stop"