intercom: Return success on HEAD requests.

Intercom sends a HEAD request to validate the webhook URL on their side,
which was not expected in the previous implementation.
This fixes the problem that we send out a confusing error message for it.

Fixes #23912.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2023-01-06 19:27:53 +08:00
committed by Tim Abbott
parent 6fb4f10abb
commit 1e36d79b83
2 changed files with 7 additions and 1 deletions

View File

@@ -265,3 +265,7 @@ New user created:
"Contact: Eeshan Garg",
"User unsubscribed from emails.",
)
def test_success_on_http_head(self) -> None:
result = self.client_head(self.url)
self.assertEqual(result.status_code, 200)