Browsing Directory Names with Space Fails with java.net.URISyntaxException Exception

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

Symptoms

Bitbucket Server reports a similar exception when browsing folders with a space in their name

1 Caused by: java.net.URISyntaxException: Illegal character in path at index 86: <Path to Folder>

Cause

This is due to the proxy server not configured correctly for URL encoding.

Resolution

Test without the proxy to confrm it't related to the proxy configuration. Ensure all steps listed in the Bitbucket Server Integration with Apache HTTP Server have been completed successfully, specially the ProxyPass and ProxyPassReverse directives. If using mod_jk, add the following option to your Apache mod_jk configuration:

1 2 <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8"/>
1 JkOptions +ForwardURICompatUnparsed
Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.