Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-29524

Failed to detect and upload OCX DMG files to Nexus Repo Raw Repository - Detected content type with content type validation


    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 3.28.0, 3.29.0, 3.36.0
    • Raw
    • macOS 10.15.7


      Error is reported when trying to upload a OCX DMG files to Nexus Repo Raw Repository (3) with Strict content type validation ON

      Error messages like: 

      Detected content type [application/zlib, application/x-deflate], but expected [application/x-apple-diskimage]: tools/hg/TortoiseHg-5.6.1-mac-x64-qt5.dmg


      Detected content type [application/x-bzip], but expected [application/x-apple-diskimage]: tmp/nimble-commander-1.2.7(3120).dmg

      File names depends on loaded  DMG files name.

      Affected: Nexus Repository Manager 3 

      • Reproduced in  versions:
      • 3.36.0-01
      • 3.31
      • and earlier.

      What I would expect is that the DMG files to be uploaded without errors having  content type validation ON, as it is required in other cases.

      Meantime, similar issue NEXUS-17830 was closed with a solution just to change the Strict content type validation OFF. Such solution It is not suitable for most cases.

      Proposed solution

      As I debugged, the issue with mime type detection is cased by restrictions of the Apache Tika component. Tika fails to detect OCX DMG files correctly, detecting correctly from a name, but then assuming them as zlib files. Related issue TIKA-3590 was posted there with a proposed solution.

      As to nexus, a local solution is attached as nexus3-public-dmg-detect-fix.diff and I will try to commit it.






        Issue Links



              Unassigned Unassigned
              salmira Tetiana Tvardovska
              Joe Tom Joe Tom
              1 Vote for this issue
              2 Start watching this issue