[prev in list] [next in list] [prev in thread] [next in thread]
List: horde
Subject: Re: [horde] client mime-type mismatch
From: Andrew Morgan <morgan () orst ! edu>
Date: 2010-01-21 21:45:11
Message-ID: alpine.DEB.2.00.1001211339570.11527 () shell ! onid ! oregonstate ! edu
[Download RAW message or body]
On Thu, 21 Jan 2010, Michael M Slusarz wrote:
> Quoting Andrew Morgan <morgan@orst.edu>:
>
>> On Thu, 21 Jan 2010, Michael M Slusarz wrote:
>>
>>> Quoting Michael Rubinsky <mrubinsk@horde.org>:
>>>
>>>> Quoting Andrew Morgan <morgan@orst.edu>:
>>>>
>>>>> I was able to replicate this problem on my own computer and started
>>>>> searching in Horde for some problem with mime-type detection. Finally I
>>>>> realized that it was my own browser sending the wrong mime-type! When I
>>>>> looked in Firefox's content-type handling, I saw:
>>>>>
>>>>> PDF File (application/applefile) Always Ask
>>>>> PDF File (application/pdf) Open with xpdf
>>>>>
>>>>> Once I edited the mimeTypes.rdf file to remove all applefile references,
>>>>> the problem was fixed (for me).
>>>>>
>>>>> Obviously, Horde is using the mime-type reported by the client browser.
>>>>> Is that still a good idea, or would it be better if Horde used it own
>>>>> mime detection (or fileinfo) on all uploaded files?
>>>>>
>>>>> Finally, does anyone know how I got that crazy mime-type in Firefox?
>>>>
>>>> Yup. This is a known issue with FF and has been discussed a few times on
>>>> our mailing lists. In fact, there was a recent discussion about replacing
>>>> client side with server side detection. See the following for the start
>>>> of the thread:
>>>>
>>>> http://lists.horde.org/archives/dev/Week-of-Mon-20100111/024651.html
>>>
>>> ...or just skip ahead and see the solution (IMP 5 only):
>>>
>>> http://lists.horde.org/archives/commits/2010-January/002854.html
>>
>> Well, I agree that is *a* solution, although if I'm reading it right, the
>> default hook code won't fix my problem. If the browser supplies a
>> mime-type that is not application/octet-stream, it won't do the server-side
>> detection.
>
> By default, no. That's precisely the point since 99% of the time the
> browser-side detection will be correct.
>
>> Obviously, I can modify the hook to force server-side detection, or at
>> least override it for application/applefile, so that seems good to me!
>
> And that's precisely the elegance of this solution. Admins can now fix this
> server-side instead of tracking this down on a particular browser on a
> particular user's machine.
>
> The idea is to potentially add some more checking to the default hook to
> handle troublesome MIME types. Not sure if your situation was a one-time
> only issue or something that may occur on a more frequent basis across
> numerous installations.
Apparently this is a widespread problem with Firefox and Thunderbird:
http://www.google.com/#hl=en&q=firefox+mime+types+applefile
In order to have the least impact, I could trigger server-side mime-type
detection only on application/applefile uploads.
Andy
--
Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-unsubscribe@lists.horde.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic