[ 
https://issues.apache.org/jira/browse/TIKA-1335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030078#comment-14030078
 ] 

Kaijian Xu commented on TIKA-1335:
----------------------------------

My actual goal is to provide mime type detection of _arbitrary_ file types 
using TikaJAXRS, so I've also observed that:
% curl -T foo.csv http://localhost:9998/meta 
"Content-Encoding","ISO-8859-1"
"Content-Type","text/plain; charset=ISO-8859-1"

In fact, it will even override an explicitly provided content type:
% curl -T foo.csv http://localhost:9998/meta --header "Content-Type: text/csv"
"Content-Encoding","ISO-8859-1"
"Content-Type","text/plain; charset=ISO-8859-1"

Whereas the usual behavior is for the explicitly given type to be honored, e.g.
% curl -T bar.png http://localhost:9998/meta --header "Content-Type: text/plain"
"Content-Encoding","IBM866"
"Content-Type","text/plain; charset=IBM866"


> mime type for CSV files incorrectly detected as text/plain
> ----------------------------------------------------------
>
>                 Key: TIKA-1335
>                 URL: https://issues.apache.org/jira/browse/TIKA-1335
>             Project: Tika
>          Issue Type: Bug
>          Components: mime
>    Affects Versions: 1.5, 1.6
>            Reporter: Kaijian Xu
>         Attachments: CDEC_WEATHER_2010_03_02, foo.csv, velocity.csv
>
>
> Mime type autodetection returns "text/plain" for CSV files, for example:
> % tika -m foo.csv
> Content-Encoding: ISO-8859-1
> Content-Length: 78
> Content-Type: text/plain; charset=ISO-8859-1
> resourceName: foo.csv
> This occurs regardless of whether the filename has the appropriate *.csv 
> extension or not.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to