Skip to content

fix: measure event payload limits in UTF-8 bytes - #266

Open
Shubham-Padkonde wants to merge 1 commit into
pusher:masterfrom
Shubham-Padkonde:fix/utf8-payload-size
Open

Shubham-Padkonde wants to merge 1 commit into
pusher:masterfrom
Shubham-Padkonde:fix/utf8-payload-size

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Event payload validation uses sys.getsizeof(), which measures Python object storage rather than UTF-8 data size. This rejects valid ASCII payloads near the limit and accepts some oversized multibyte payloads.

Measure encoded UTF-8 bytes for both trigger and trigger_batch, retaining the existing 30 KiB and 10 KiB thresholds. Four regression cases cover exact-size ASCII and oversized three-byte characters across both methods; all four fail before the fix.

Validation: 67 unittest tests run successfully (one existing skip); git diff --check passes. Independent of #265.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant