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

feat: enable automatic MIME detection for crashpad attachments. #973

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
**Features**:

- Add optional Gzip transport compression via build option `SENTRY_TRANSPORT_COMPRESSION`. Requires system `zlib`. ([#954](https://github.com/getsentry/sentry-native/pull/954))

- Enable automatic MIME detection of attachments sent with crash-reports from the `crashpad_handler`. ([#973](https://github.com/getsentry/sentry-native/pull/973), [crashpad#98](https://github.com/getsentry/crashpad/pull/98))

**Fixes**:

- Fix the Linux build when targeting RISC-V. ([#972](https://github.com/getsentry/sentry-native/pull/972))
Expand Down
2 changes: 1 addition & 1 deletion external/crashpad
7 changes: 5 additions & 2 deletions tests/assertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import re
import sys
from dataclasses import dataclass
from datetime import datetime
from datetime import datetime, UTC

import msgpack

Expand Down Expand Up @@ -185,7 +185,7 @@ def assert_minidump(envelope):
assert minidump.payload.bytes.startswith(b"MDMP")


def assert_timestamp(ts, now=datetime.utcnow()):
def assert_timestamp(ts, now=datetime.now(UTC)):
assert ts[:11] == now.isoformat()[:11]


Expand Down Expand Up @@ -263,6 +263,9 @@ def _load_crashpad_attachments(msg):
breadcrumb1 = []
breadcrumb2 = []
for part in msg.walk():
if part.get_filename() is not None:
assert part.get("Content-Type") is None

match part.get_filename():
case "__sentry-event":
event = msgpack.unpackb(part.get_payload(decode=True))
Expand Down
Loading