Align retained webhook clear control with upstream normalization

The combined-tree race check exposed the retained clear-header fixture still expecting an empty Content-Type. Upstream correctly removes cleared headers so the JSON default survives; align only that fixture expectation, and fix the strict helper comment. Preserve source-rs9sv1rz failure and do not change production normalization or rejection behavior.

Contract-Neutral: Test expectation and helper-comment reconciliation only; cleared header normalization is already supplied by reviewed upstream.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-10-06 09:55:26 +01:00
parent 4a764d7380
commit a385ee7250
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -510,7 +510,7 @@ func (h *NotificationHandlers) CreateWebhook(w http.ResponseWriter, r *http.Requ
}
}
// restoreMaskedWebhookValues resolves only submitted placeholders. The editor
// restoreStrictMaskedWebhookValues resolves only submitted placeholders. The editor
// sends a replacement map: explicit edits and omitted keys must not be undone
// just because another value is still masked. Header names are case-insensitive;
// custom-field names are not. Never store a placeholder without a saved value.
+1 -1
View File
@@ -1418,7 +1418,7 @@ func TestWebhookEditPreservesOnlyMaskedValues(t *testing.T) {
map[string]string{"token": "synthetic-token", "channel": "new", "added": "new"}, false},
{"clear beside masks", map[string]string{"Authorization": masked, "Content-Type": ""},
map[string]string{"token": masked, "channel": ""},
map[string]string{"Authorization": "synthetic-auth", "Content-Type": ""},
map[string]string{"Authorization": "synthetic-auth"},
map[string]string{"token": "synthetic-token", "channel": ""}, false},
{"header case is insensitive", map[string]string{"authorization": masked}, map[string]string{"token": masked},
map[string]string{"authorization": "synthetic-auth"}, map[string]string{"token": "synthetic-token"}, false},