-
Notifications
You must be signed in to change notification settings - Fork 265
Webhook silently fails when header contains colon #271
Copy link
Copy link
Open
Description
Hi Pinterest,
We're seeing webhooks fail when headers contain colons - we presume it's the line here:
teletraan/deploy-service/common/src/main/java/com/pinterest/deployservice/handler/WebhookJob.java
Line 70 in a4201f2
| headers = Splitter.on(';').trimResults().withKeyValueSeparator(":").split(webhook.getHeaders()); |
Are the headers supposed to be kv pairs split with colons (as the code suggests), or equals signs (as the docs/tooltips) suggest?
An example header string that repros the behavior: Accept=application/json;Content-Type=application/json;Authorization=tok:747703
Log output:
cat service.log | grep "com.pinterest.deployservice.handler.WebhookJob"
INFO [2016-11-15 11:29:48,397] com.pinterest.deployservice.handler.WebhookJob: Url after transform is https://api.webhook.com
INFO [2016-11-15 11:29:48,397] com.pinterest.deployservice.handler.WebhookJob: Header string after transform is Accept=application/json;Content-Type=application/json;Authorization=tok:747703
INFO [2016-11-15 11:29:48,397] com.pinterest.deployservice.handler.WebhookJob: Body string after transform is {"json":"data"}
There is no other entries in the log, so I presume that it is silently failing somewhere between L66 and L78.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels