Summary: | Cannot detect PDF file type if binary data exists before magic | ||
---|---|---|---|
Product: | shared-mime-info | Reporter: | Philippe Gauthier <philippe.gauthier> |
Component: | freedesktop.org.xml | Assignee: | Shared Mime Info group <shared_mime_info> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Test PDF file with prepended binary data |
Description
Philippe Gauthier
2010-07-15 11:50:38 UTC
Any chance you could provide such a test file then? Created attachment 37245 [details]
Test PDF file with prepended binary data
Before :
$ gvfs-info testcase.is-really-a-pdf | grep content-type
standard::content-type: application/octet-stream
standard::fast-content-type: application/octet-stream
After :
$ gvfs-info testcase.is-really-a-pdf | grep content-type
standard::content-type: application/pdf
standard::fast-content-type: application/octet-stream
commit 7d42fc0da8068df8892842cc4005395471f4d2b0 Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jul 20 18:33:05 2010 +0100 Fix PDF magic detection As per spec, the first 1024 bytes can contain binary garbage, before the actual PDF magic header. With help from Philippe Gauthier <philippe.gauthier@deuxpi.ca> https://bugs.freedesktop.org/show_bug.cgi?id=29083 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.