Bitbucket Server webhooks cannot be added due to Syntax or http error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

Post-Receive webhooks cannot be added when using IIS proxies.

The following appears in the atlassian-bitbucket.log:

1 Syntax or http error: /s/71095c56c641f2c4a4f189b9dfcd7a38-T/en_US/3619e0d/1/127ae82fe7ed82b6d279c6233630ef0d/_/download/contextbatch/js/com.atlassian.stash.plugin.stash-web-post-receive-hooks-plugin:postReceiveHook-config-form,-bitbucket.layout.repositorySettings,-bitbucket.page.repository.settings.hooks,-bitbucket.layout.entity,-_super,-bitbucket.layout.repository,-bitbucket.layout.base,-atl.general/batch.js?locale=en-US

Diagnosis

Diagnostic Steps

To confirm that the problem is related to the reverse proxy, follow the steps on How do I bypass a proxy for Bitbucket Server and attempt to add the webhook through the non-proxied port.

If the webhook can successfully be added, the proxy configuration is preventing to add it when the call is directed through it.

Cause

IIS proxies do not correctly handle colon (:) in URLs before the question mark (?).

The URL reported in the error contains one as shown in the snippet below:

1 com.atlassian.stash.plugin.stash-web-post-receive-hooks-plugin:postReceiveHook-config-form

Solution

Resolution

As mentioned on the IIS forum, the problem can be resolved by running the Application Pool .NET4 instead of .NET2.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.