开发者

Firefox on WinXP delivers odd mime-type for uploaded PDF

开发者 https://www.devze.com 2023-02-04 22:04 出处:网络
When uploading a PDF file from an HTML form, the mime-type Firefox (WinXP) provides in the request header is:

When uploading a PDF file from an HTML form, the mime-type Firefox (WinXP) provides in the request header is:

Content-Type: /home/www/vesta/services/stamper/data/e5456e0699badbe373740d28eca79d09:

I've seen plenty of application/pdf and application/download, but never anything like this.

[BTW, I understand that trusting the file extension and the mime-type reported by the browser is unr开发者_StackOverflow中文版eliable, since it all comes from the client-side. Of course, server-side introspection methods are more reliable. But I'm still interested in this unusual browser behavior.]

Anybody ever seen something like this? Many thanks in advance.


See this Ubuntu bug report and Mozilla bug #373621.

For some reason, Firefox has been convinced (via mimeTypes.rdf) that PDF files have a different MIME type. Delete the offending entry from your mimeTypes.rdf file (in your profile directory).


Had it happen to me on a Gentoo Linux, and completely out of the blue as well, without any software updates or anything else. Two days ago I was uploading PDF files as application/pdf, today I see I am sending exactly the same weird content type as the OP.

0

精彩评论

暂无评论...
验证码 换一张
取 消