Skip to content

Pushing text files result in a wrong mime type error #48

@gaelgatelement

Description

@gaelgatelement

Describe the bug

Using the following curl command :

curl -k -H 'Host: synapse.dev.local' -X POST --header 'Authorization: Bearer {user_access_token}' --header 'Content-Type: text/plain' --data-binary <text file> 'https://localhost/_matrix/media/v3/upload

When getting the file, Matrix content scanner returns the following error :

2023-09-27 16:21:04,922 - matrix_content_scanner.scanner.scanner - 518 - ERROR - GET-1348 - Mismatching MIME type (text/plain) and Content-Type header (text/plain; charset=UTF-8)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions