Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow upload torrent with application/octet-stream HTTP header Content-Type #491

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Feb 22, 2024

Relates to: torrust/torrust-index-gui#483

Some users are having problems uploading torrents becuase the client (browser or other clients) use the HTTP header Contetnt-Type:

application/octet-stream

instead of:

application/x-bittorrent

It seems that the reason is they don't have any application associated to that extension. So it uses the generic binary file mime type.

The MIME type can be inferred from the file extension. If the system or application uploading the file has a specific association for .torrent files, it might set the MIME type to application/x-bittorrent. In the absence of such an association, it might fall back to the generic application/octet-stream.

HTTP header Content-Type.

Some users are having problems uploading torrents becuase the client
(browser or other clients) use the HTTP header Contetnt-Type:

`application/octet-stream`

instead of:

`application/x-bittorrent`

It seems that the reason is they don't have any application associated
to that extension. So it uses the generic binary file mime type.

The MIME type can be inferred from the file extension. If the system or application uploading the file has a specific association for .torrent files, it might set the MIME type to application/x-bittorrent. In the absence of such association, it might fall back to the generic application/octet-stream.
@josecelano josecelano force-pushed the 483-request-header-content-type-should-be-applicationx-bittorrent branch from 7ab5107 to 8a97b5b Compare February 22, 2024 16:20
@josecelano
Copy link
Member Author

ACK 8a97b5b

@josecelano josecelano added this to the v3.0.0 milestone Feb 22, 2024
@josecelano josecelano merged commit b8d85a5 into torrust:develop Feb 22, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant