Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9240717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:14:22+00:00 2026-06-18T08:14:22+00:00

I have perl script which is setting header with following command print Content-Disposition: attachment;

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:14:23+00:00Added an answer on June 18, 2026 at 8:14 am

    Thank you very much for your support.

    I tried for following perl code and it helped me to resolve the issue

    # Set the header using following way
    print "Content-Type: text/plain", "\n";
    print "Content-length: $length", "\n";
    print "Content-Disposition: attachment; filename=test.csv\n\n";
    

    note : $length is a variable which store the file content length as shown below

    my $csv = "testing";
    my $length = length $csv;
    

    Thanks!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script which behaves differently on two different Perl installations I
I have following line in my perl script (which I run from cshell) system(perl
I have a small perl script ( found here ) which adds command line
I have a Perl script which maps two drives, and then proceeds to copy
I have a Perl script which nests foreach loops as seen below. It takes
I have a Perl script which will allow for a file to be uploaded
I have a Perl script which calls another script. The Perl script should be
I have a Perl script which I want to run every 4 hours through
A little background: I have a perl script which is performing a number of
gurus. I have a perl script which needs to run in an infinite loop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.