I am using nio to download a file given from a web address. I have not conducted extensive
testing but my code works for text files and zip files, but NOT exe or bin files. I assume it works for all text and no binary (although zip is binary right?). The weird thing is, I set up
tomcat, and I can download a zip, open the exe in it and it works, but if I extract the exe and try to download via tomcat, it downloads the correct number of bytes, but the exe is not valid, won't open.
I think my problem exists in the GET header I am passing the socket, maybe I need to define the mime type I want to accept? Any body can pass me some help, I'd be greatly appreciative.
Here is the GET header as descibed below also
This is a full "working" example, the exe I am downloading I choose at random, choose another if you'd like.
[ November 03, 2005: Message edited by: Joe Ess ]