tbentleypfpt commented on a change in pull request #356:
URL: https://github.com/apache/tika/pull/356#discussion_r494523989



##########
File path: 
tika-parser-modules/tika-parser-pkg-module/src/main/java/org/apache/tika/parser/pkg/PackageParser.java
##########
@@ -287,6 +284,35 @@ public void parse(
         xhtml.endDocument();
     }
 
+    private ZipArchiveInputStream 
updateZipArchiveInputStream(ArchiveInputStream ais, Metadata metadata, 
InputStream stream, String entryEncoding) throws IOException {
+        boolean allowStoredEntriesWithDataDescriptor = false;
+        ZipArchiveInputStream zais;
+        try {
+            readEntries(metadata, ais, null, null, false);
+        } catch (UnsupportedZipFeatureException zfe) {
+            if (zfe.getFeature() == Feature.DATA_DESCRIPTOR) {
+                allowStoredEntriesWithDataDescriptor = true;
+            }
+        } catch (Exception ignored) {}
+        finally {
+            ais.close();
+            stream.reset();

Review comment:
       That makes sense. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to