Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 11417 invoked from network); 14 Jun 2008 12:52:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2008 12:52:21 -0000 Received: (qmail 87842 invoked by uid 500); 14 Jun 2008 12:52:13 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 87822 invoked by uid 500); 14 Jun 2008 12:52:13 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 87803 invoked by uid 99); 14 Jun 2008 12:52:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jun 2008 05:52:13 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.85.38.174] (HELO popeye.combios.es) (212.85.38.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jun 2008 12:51:23 +0000 Received: from [192.168.245.129] (p549EB118.dip0.t-ipconnect.de [84.158.177.24]) (authenticated bits=0) by popeye.combios.es (8.13.8/8.13.8/Debian-3) with ESMTP id m5ECpVA7000684 for ; Sat, 14 Jun 2008 14:51:31 +0200 Message-ID: <4853BED0.5000707@ice-sa.com> Date: Sat, 14 Jun 2008 14:51:28 +0200 From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: users@httpd.apache.org References: <46ACC107A90D4F93BF56400001E78FE1@teddy> In-Reply-To: <46ACC107A90D4F93BF56400001E78FE1@teddy> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on popeye.combios.es X-Virus-Scanned: ClamAV 0.92.1/7471/Sat Jun 14 00:57:32 2008 on popeye.combios.es X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-97.9 required=2.5 tests=RCVD_IN_PBL, RCVD_IN_SORBS_DUL,USER_IN_WHITELIST autolearn=no version=3.2.3 Subject: Re: [users@httpd] Downloading a CSV file Hi. I suggest that you first make the following search in Google : ie +"mime type" and then read some. It will tell you what you are up against. In summary : The behaviour of various versions and sub-versions of Internet Explorer with respect to files received from a HTTP server, is variable, erratic, and in most cases conflicts with the specifications of the relevant Internet RFCs. (I am hereby referring to the "Content-type" and "Content-disposition" headers). In the practice, it means that if you find one set of HTTP headers that works with one IE version/revision, it probably will not do the same with other versions/revisions. In addition, I have found that even with identical versions of IE, sometimes client stations will still react differently, depending on which (other) program is installed on the workstation. (For example, you may find that depending on whether your client has or not MS-Excel installed on his workstation, the behaviour of IE versus your CSV files will change). And since you cannot exactly control which version of IE your client is using, nor the programs installed on his workstation, you're in trouble. The only way that I have found to get a more or less consistent behaviour, is to "sniff out" the IE version used by the client (see the "User-Agent" request header), and adapt the headers you send in function of that. It's not pretty and no fun. It will also probably cost you many hours of lost time explaining the same over and over to your users and their system administrators, hours for which MS will not compensate you. If anyone else on this list has a different experience and a better solution, please let us know. Note that this topic has alrady been discussed ad nauseam in a multitude of lists and web discussions, so adding your own complaint will probably just be a drop in the ocean. But I could not resist warning this new victim. André Octavian Rasnita wrote: > Hi, > > I've made a program that creates a .csv file and offer it for downloading. > > If a user uses Internet Explorer 6 to download the file and it chooses > to right-click then "Save as..." from the context menu, the file is > downloaded right. > > But if the user just clicks or hits enter on the link for downloading > that file, the user is asked what he wants to do, to save or open the > file, and if he choses that he wants to save it, that window remains > open and it doesn't ask for the name of the file. > > I've used lwp-request (from ActivePerl) to see which are the HTTP > headers received. Please tell me what should I change, add or remove in > order to be able to download that file by just clicking on the link. > > Thank you. > > The headers are: > > Cache-Control: no-store, no-cache, must-revalidate, post-check=0, > pre-check=0, max-age=0 > Connection: close > Date: Sat, 14 Jun 2008 12:09:38 GMT > Pragma: no-cache > Server: Apache/2.2.8 (Fedora) > Content-Length: 4358 > Content-Type: text/csv > Expires: Thu, 01 Jan 1970 00:00:00 GMT > Client-Date: Sat, 14 Jun 2008 12:13:49 GMT > Client-Peer: xx.xxx.xxx.xxx:80 > Client-Response-Num: 1 > Content-Disposition: attachment;filename="REGS--2008-06-13.csv" > Set-Cookie: zzzz=6eb405c4774a704757d6455963ec7bfc10810eb9; > domain=www.tranzactiibursiere.ro; path=/ > X-Catalyst: 5.7014 > > > Octavian > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See for more info. > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > " from the digest: users-digest-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org