LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-17-2011, 04:22 AM   #1
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
apache server and csv files issue with IE


Not sure where this belongs. Might be apache related, might be IE related or might be Windows related.

The basic question is why Internet Explorer thinks (or is told) that a csv file is a zip file when the user clicks on a link to the file. Is it IE's intelligence or is there something on the server that needs to change. Firefox (under windows) does not suffer from this. And this only happens with files starting with PK (yes, I know)

The files are served from an apache webserver via https.

Can this be a mime type issue? I'm not sure how mime types work; does the server tell the client something about it? There is definitely no reference to csv and the default mime type is text/plain. Also, the fact that FF does not suffer from it does not point in the direction of mime types (but I might be totally wrong).

Any pointers? For now I have modified how the files are generated, but it's not really a satisfying solution as this can happen again when I forget about it.
 
Old 08-17-2011, 12:55 PM   #2
robert.wolfe
LQ Newbie
 
Registered: Jul 2006
Distribution: Debian for Sparc, OpenSUSE 11.2, Solaris 9, Debian/x86, Ubuntu Server
Posts: 19

Rep: Reputation: 1
Quote:
Originally Posted by Wim Sturkenboom View Post
Not sure where this belongs. Might be apache related, might be IE related or might be Windows related.

The basic question is why Internet Explorer thinks (or is told) that a csv file is a zip file when the user clicks on a link to the file. Is it IE's intelligence or is there something on the server that needs to change. Firefox (under windows) does not suffer from this. And this only happens with files starting with PK (yes, I know)

The files are served from an apache webserver via https.

Can this be a mime type issue? I'm not sure how mime types work; does the server tell the client something about it? There is definitely no reference to csv and the default mime type is text/plain. Also, the fact that FF does not suffer from it does not point in the direction of mime types (but I might be totally wrong).

Any pointers? For now I have modified how the files are generated, but it's not really a satisfying solution as this can happen again when I forget about it.
This sounds like a MIME type issue, but for some reason I am not thinking this is since those are usually set as file associations in Windozzzze I am going to say that this would probably be an issue with IE itself, and since .CSV files are, for all intents and purposes, plaintext files.
 
Old 08-18-2011, 12:23 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Thanks for the reply.

I've added AddType text/plain .csv in the apache conf and it did not make a difference.
I have moved the file to an Apache server on the internet (at my ISP, the other one was on the intranet) and it did not make a difference.
I have tried to convert the file to DOS format (CR/LF) as a final straw and it did not make a difference.

Only option left is to try to get the file on an IIS server and see what happens. After that it's time to file a bug report with Microsoft
 
Old 08-18-2011, 03:46 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Yep, it's solved with mime types.

The solution came after the file was loaded on a colleagues IIS server and IE all at a sudden decided that it was no longer a compressed file.

Added the below line to apache's http.conf

Code:
    AddType application/octet-stream .csv
IE as well as Firefox now offer to open the file in excel (or OOo in Linux) or to save it.

No need to bug Microsoft with a bug report (although I still think it's a bug ); I can spent that time on trying to understand how the interaction between browser and server works.

Anybody an useful link for that? And preferably not a pile of RFCs I did try to research before I posted but have not found a link that exactly states how mime types are used in the 'file transfer'.

WimS
 
Old 08-18-2011, 06:44 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
After some googling, I found some articles that make things a little clearer. One of them (indirectly) referred to http://www.iana.org/assignments/medi...ext/index.html which lists csv. My interpretation is that the mime type is plain/text.

I verified that with Rex Swain's HTTP Viewer with the file on the web and it indeed is plain/text.

Conclusion:
bug in IE

//Edit 23 Aug 2011
Just installed IE9 and that seems to have solved the problem.

Last edited by Wim Sturkenboom; 08-23-2011 at 01:34 AM. Reason: See edit
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache server hosting issue Zedicus Linux - Server 11 09-29-2010 06:31 PM
ErrrorLog issue: Cannot see any log files in Apache Linux rajareddy.gvr Linux - Software 6 10-21-2009 12:33 PM
Apache server issue.... kishorerhce508 Linux - Server 6 07-07-2009 11:16 AM
Comparing two csv files and write different record in third CSV file irfanb146 Linux - Newbie 3 06-30-2008 09:15 PM
Issue with Apache Server?? ajeetraina Linux - Server 1 11-15-2007 02:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration