Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

finfo returns wrong mime type for (.tar).xz files #11298

Closed
@nilllzz

Description

@nilllzz

Description

Running a mime type detection on .xz archive files returns an incorrect mime type.

This code:

$path ="[Path to .xz file]";$finfo =new \finfo(FILEINFO_MIME_TYPE);$mimeData =$finfo->file($path);echo$mimeData;

Resulted in this output:

"application/octet-stream"

But I expected this output instead:

"application/x-xz; charset=binary"

This is apparently an issue with libmagic version 5.40 and was fixed in 5.41 (refhttps://bugs.astron.com/view.php?id=257).
The specific fix to the magic file can be found here:file/file@9b0459a

I suggest a similar fix toGH-8805 that was done in34fa65a, since the issue seems very similar.

PHP Version

PHP 8.2.3

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp