Skip to content

Pass on multipart attachments without a content-type #3224

@supervacuus

Description

@supervacuus

This relates to getsentry/sentry-native#955.

A summary of the above issue is:

  • attachments sent via the crashpad_handler (which sends them as part of a multipart request) cannot be previewed in the web-ui because they all have content-type application/octet-stream by default.
  • attachments sent as envelope items typically do not get a content-type header, in which case they will be MIME detected in the backend and only assigned application/octet-stream if no MIME type could be identified.
  • users would like to see the same behavior for attachments sent via the crashpad backend.

To achieve this in the Native SDK, we'd remove the content-type header from the multipart attachments sent via the crashpad_handler. This would reflect how we send attachment envelop items, which we also send without content type (this seems to be the default for other SDKs).

But to make this change in the Native SDK meaningful, we'd need Relay to pass on multipart attachments without content type if the SDK sent them this way (similar to how envelope attachments' content types are untouched). Right now, Relay assigns application/octet-stream to incoming multipart attachments without a content type.

Are there currently any components that rely on the automatic content type assignment in Relay, rather than deferring to the MIME detector in the Python code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions