DHIS 2 web request gives “Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986”
This happens because DHIS 2 uses brackets in some of their URLs, and because Tomcat version 8.5 later has prohibited the use of brackets in URLs.
The DHIS 2 team is working on a change in the API syntax to avoid the use of brackets, and to encode all API request URLs.
A short-term fix is to configure Tomcat to allow for brackets through the relaxedQueryChars connector attribute. Open the following file:
and add relaxedQueryChars="" to the HTTP connector element: