[ http://issues.apache.org/jira/browse/NUTCH-33?page=comments#action_62415 ] John Xing commented on NUTCH-33: --------------------------------
>What is your opinion about this point: >1. Is it the calling code that check the mime.magic property and call >the >getMimeType(String) or getMimeType(String, byte[]) depending on >the value, >2. or is it the getMimeType(String, byte[]) method that must check >the >mime.magic property and uses the magic resolution if the flag is >true? >The first second one is better for consistency. >But the second one is strange: You call a getMimeType(String, byte[]) >instead >of getMimeType(String) so the developper expects to uses the >magic analyzis >to be performed.... Yes, 1. is preferred. It's the job of calling code (in nutch plugins or tools) to check nutch config property and do getMimeType(). Ideally, mimetype code shall not be tainted with any nutch specifics. > MIME content type detector (using magic char sequences) > ------------------------------------------------------- > > Key: NUTCH-33 > URL: http://issues.apache.org/jira/browse/NUTCH-33 > Project: Nutch > Type: New Feature > Reporter: Jerome Charron > Assignee: John Xing > Priority: Minor > Attachments: NUTCH-33.patch, mime-types.tar.gz > > Extension based content-type detector is not suffisant in some cases. > The solution is to add a content type detector based on some magic char > sequences like in apache httpd for instance. > (Note: I created this issue only to keep a trace, but I'm currently working > on it) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Nutch-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nutch-developers
