[OT] Downloading .exe files and https
[OT] Downloading .exe files and https
- Subject: [OT] Downloading .exe files and https
- From: Ute Hoffmann <email@hidden>
- Date: Mon, 27 Sep 2004 12:55:12 +0200
Hallo,
I posted before because of the problems I had after SP2 came out. I first thought I had solved this issue with your help by using explicit headers for .zip. This seems to be true for all types of files but not for .exe-Files.
I get a file could not be found-message when trying to download:
.exe-File via a component action which gives the file Data back as a response.
This happens only within a https-Application, as soon as I try the same link without ssl it does work and no error message. Other file types can be downloaded within ssl without any problems with the same component handling the response.
I cannot see anything special, which could break in ssl in my code. I though paste in my code below. just in case. Perhaps I have placed the call to super at the wrong place?
Now: Has anybody a glue what this could be and could give me a hint where to look for the problem?
Thanks for some help,
Regards
Ute
Here is my code:
public void appendToResponse( WOResponse response, WOContext context)
{
fileEinlesen(); //just reads the file into an NSData Object
super.appendToResponse( response, context); //Perhaps this should be placed differently???
String endung = ersetzen.bildTest(fileName); //checks, which file ending is there
"zip")){
response.setHeader("application/x-zip", "content-type");
}
else "doc")){
response.setHeader("application/msword", "content-type");
}
else
{
response.setHeader("application/octet-stream", "content-type");
}
/*** this header used for open in brower with plug-in, if you don't have plug-in automactly going window for donwload. */
"exe")){
response.setHeader("filename=" + fileName, "content-disposition");
}
/*** this header call directly window for download */
response.setHeader ("attachment;filename="+ fileName, "content-disposition");
response.setHeader(new Long( youNSDataFile.length() ).toString(), "content-length");
response.setContent( youNSDataFile );
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden