Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pushing text files result in a wrong mime type error

Open
#48 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
security

Research direction

Start with the Matrix media v3 upload path and the content scanner handling for the curl request using Content-Type: text/plain. Trace how the uploaded text file's MIME type becomes text/plain; charset=UTF-8, then verify that scanning and retrieval accept the same type without the mismatch error.

Written by the indexing model from the issue text.

Description

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)
Dominant language
Python
Stars
25
Forks
16
Avg merge
1d 7h
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from element-hq/matrix-content-scanner-python

All issues in element-hq/matrix-content-scanner-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.