[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2153 - in Extractor: . src/plugins/ole2
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2153 - in Extractor: . src/plugins/ole2 |
Date: |
Tue, 27 Sep 2005 10:51:03 -0700 (PDT) |
Author: grothoff
Date: 2005-09-27 10:51:01 -0700 (Tue, 27 Sep 2005)
New Revision: 2153
Modified:
Extractor/ChangeLog
Extractor/src/plugins/ole2/ole2extractor.c
Log:
Better mimetype detection for MS-Word files
From:
Ronan MELENNEC <address@hidden>
To:
address@hidden
Date:
Today 03:15:41
Hello Christian,
An anonymous contributor to your site presents an MS-Word file
which doesn't yield the expected mimetype.
Attached patch (relative to the current SVN) should correct this.
Cordially,
--
Ronan Melennec | DGAC/DSNA/DTI/SDER/3/RFM
<address@hidden> | Division Routes, Flux et Mod?\195?\169lisations (RFM)
+33 (0) 1 69 57 69 28 | Orly Sud 205 -- 94542 ORLY AEROGARE CEDEX
--
Modified: Extractor/ChangeLog
===================================================================
--- Extractor/ChangeLog 2005-09-27 14:44:28 UTC (rev 2152)
+++ Extractor/ChangeLog 2005-09-27 17:51:01 UTC (rev 2153)
@@ -1,3 +1,6 @@
+Tue Sep 27 11:01:57 PDT 2005
+ Again better Mime-type detection for OLE2 streams.
+
Mon Sep 26 20:44:10 PDT 2005
Minor improvements to the PDF extractor:
- first change is to avoid outputting keywords with empty values
Modified: Extractor/src/plugins/ole2/ole2extractor.c
===================================================================
--- Extractor/src/plugins/ole2/ole2extractor.c 2005-09-27 14:44:28 UTC (rev
2152)
+++ Extractor/src/plugins/ole2/ole2extractor.c 2005-09-27 17:51:01 UTC (rev
2153)
@@ -2206,13 +2206,18 @@
if(NULL != software) {
const char * mimetype = "application/vnd.ms-files";
- if(0 == strncmp(software, "Microsoft Word", 14))
+ if((0 == strncmp(software, "Microsoft Word", 14)) ||
+ (0 == strncmp(software, "Microsoft Office Word", 21)))
mimetype = "application/msword";
- else if(0 == strncmp(software, "Microsoft Excel", 15))
+ else if((0 == strncmp(software, "Microsoft Excel", 15)) ||
+ (0 == strncmp(software, "Microsoft Office Excel", 22)))
mimetype = "application/vnd.ms-excel";
- else if(0 == strncmp(software, "Microsoft PowerPoint", 19))
+ else if((0 == strncmp(software, "Microsoft PowerPoint", 20)) ||
+ (0 == strncmp(software, "Microsoft Office PowerPoint", 27)))
mimetype = "application/vnd.ms-powerpoint";
-
+ else if(0 == strncmp(software, "Microsoft Office", 16))
+ mimetype = "application/vnd.ms-office";
+
prev = addKeyword(prev, mimetype, EXTRACTOR_MIMETYPE);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2153 - in Extractor: . src/plugins/ole2,
grothoff <=