HTTP Client modifies XML response body



Is it correct that the HTTP Client does not show the exact contents of the response body of a request, if the type is XML?


To reproduce, create this file:

$ cat testdata.xml 

Start a webserver, for example with JDK 18:

$ jwebserver --port 8000

Execute this request with the HTTP Client:

GET http://localhost:8000/testdata.xml

The response is shown:

Instead of the string \u0002, a symbol is shown that probably represents a Unicode U+0002 character.

curl returns the contents of the XML file:

$ curl -X GET --location "http://localhost:8000/testdata.xml"

Tested with IDEA 2023.3.6.


Hi Maarten - thanks for taking the time to report this.

It appears to be a bug. I reproduced it and submitted a bug report about it to our tracker so that the dev team can check it:

You are welcome to follow the progress there. I will monitor it too.


Please sign in to leave a comment.