mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-09-14 07:10:05 -04:00
A custom header carrying a non-ASCII character raised UnicodeEncodeError from inside http.client. That is a ValueError, not a RequestException, so it escaped both handlers in send() and took the whole publisher down - every notification lost because of one typo in one header. build_custom_headers now rejects newlines and non-ASCII the same way it already rejects malformed and colliding entries: warn, skip that entry, keep the rest. UnicodeEncodeError is still caught at the request, as a backstop for the plugin's own headers, since REPORT_DASHBOARD_URL feeds one of them. Verified against real requests: before, send() raised UnicodeEncodeError; after, the bad header is dropped and the notification is still posted.