I have perl script which is setting header with following command
print "Content-Disposition: attachment; filename=test.csv\n\n";
This script is behaving differently when deployed on web server IIS and Apache.
When the code is deployed on apache web server, I am able to download the file test.csv on android mobile.
But When the same script is deployed on IIS server, download is always unsuccessful on android mobile.
Note: but the download work like charm in any desktop browser for both web server.
Following is response header from IIS
(Status-Line) HTTP/1.1 200 OK
Server Microsoft-IIS/6.0
Content-Disposition attachment; filename=test.csv
X-Powered-By ASP.NET
Date Thu, 31 Jan 2013 10:10:59 GMT
Connection close
Following is response header from Apache
(Status-Line) HTTP/1.1 200 OK
Date Thu, 31 Jan 2013 10:12:33 GMT
Server Apache/2.2.22 (Win32)
Content-Disposition attachment; filename=test.csv
Keep-Alive timeout=5, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/plain
can any one help me in resolving this issue?
Thanks!
Thank you very much for your support.
I tried for following perl code and it helped me to resolve the issue
note : $length is a variable which store the file content length as shown below
Thanks!