Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-9153

MIME Type detection leaks temporary files when given a ZIP file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Content Detection Support 1.0.2
    • Commons
    • None

    Description

      Apache Sling ContentAwareMimeTypeServiceImpl seems to use the tika API improperly:
      https://github.com/apache/sling-org-apache-sling-commons-contentdetection/blob/master/src/main/java/org/apache/sling/commons/contentdetection/internal/ContentAwareMimeTypeServiceImpl.java#L55

      Per the Tika javadoc, it is using the wrong method. Instead it should be passing in a TemporaryResources object:
      https://github.com/apache/tika/blob/1.22/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java#L91

       

      Temporary disk ran out of space because of a large amount of files named "apache-tika-xxx.tmp".   It seems the bug resides in ContentAwareMimeTypeService OSGi service.  Calls to this service seem to generate the temporary files.

       

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              ankitaagar Ankita Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h