Closed Bug 356807 Opened 18 years ago Closed 17 years ago

CSV export expose text/plain as MIME content type

Categories

(Bugzilla :: Bug Import/Export & Moving, defect)

2.22.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: david.geldreich, Assigned: david.geldreich)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

When exporting a buglist as a CSV file, Bugzilla report text/plain as MIME type.

So my web browser saves it as bug.csv.txt and do not propose to open it with excel.

The "right" MIME type for CSV files is text/csv instead of text/plain

Here is my proposed patch :

*** Bugzilla/Constants.pm       14 Oct 2006 20:30:54 -0000      1.34.2.1
--- Bugzilla/Constants.pm       16 Oct 2006 12:00:37 -0000
***************
*** 153,159 ****
     "atom"=> "application/atom+xml" ,
     "xml" => "application/xml" ,
     "js"  => "application/x-javascript" ,
!    "csv" => "text/plain" ,
     "png" => "image/png" ,
     "ics" => "text/calendar" ,
    };
--- 153,159 ----
     "atom"=> "application/atom+xml" ,
     "xml" => "application/xml" ,
     "js"  => "application/x-javascript" ,
!    "csv" => "text/csv" ,
     "png" => "image/png" ,
     "ics" => "text/calendar" ,
    };


Reproducible: Always

Steps to Reproduce:
1. Search for bugs 
2. In buglist, choose CSV
3. Your web browser propose to open the file with a text editor or to save it
Version: unspecified → 2.22.1
See bug 230293 for why it is text/plain (haven't fully read it.. was text/csv at one point).
OS: Windows XP → All
Hardware: PC → All
Patch is better when attached :-)
(In reply to comment #1)
> See bug 230293 for why it is text/plain (haven't fully read it.. was text/csv
> at one point).
> 

Hello Olav,

the main concern was (at that time) that text/csv was not a registered mime type and now it is.

http://www.iana.org/assignments/media-types/text/

So I think, we could put it back.

Ok, then please request review from someone/leave it blank for attachment 242431 [details] [diff] [review] (see edit link after the attachment). See http://www.bugzilla.org/docs/contributor.html for more information and a link to a list of reviewers.
Assignee: import-export → david.geldreich
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 242431 [details] [diff] [review]
Expose right mime type for CSV

Hello Kevin,

I have tested this patch with IE and Firefox on Windows XP.
Attachment #242431 - Flags: review?(kevin.benton)
Comment on attachment 242431 [details] [diff] [review]
Expose right mime type for CSV

Looks good to me. I still want justdave's or myk's opinion though.
Attachment #242431 - Flags: review?(kevin.benton)
Attachment #242431 - Flags: review?(justdave)
Attachment #242431 - Flags: review+
Comment on attachment 242431 [details] [diff] [review]
Expose right mime type for CSV

This looks good to me as well, time to get it in.
Attachment #242431 - Flags: review?(justdave) → review+
Flags: approval?
Flags: approval3.0?
Target Milestone: --- → Bugzilla 3.0
Flags: approval?
Flags: approval3.0?
Flags: approval3.0+
Flags: approval+
Tip:
Checking in Bugzilla/Constants.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v  <--  Constants.pm
new revision: 1.76; previous revision: 1.75
done

Branch:
Checking in Bugzilla/Constants.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v  <--  Constants.pm
new revision: 1.68.2.8; previous revision: 1.68.2.7
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: