insomnia
insomnia copied to clipboard
Unable to View Response When Server Returns Incorrect Content-Encoding Header
Expected Behavior
For a better user experience, it would be beneficial if the behavior is changed as follows:
- At the end of the error message, show the server's response, such as 'UTF-8' header returned by the server is incorrect. This allows users to understand more clearly why Insomnia considers it an error.
- Instead of treating header parsing failure as an error, display it as a warning and perform a fallback action by automatically detecting and decoding the encoding to UTF-8, then show the response.
Actual Behavior
Servers often return technically incorrect Content-Encoding headers. The server I'm testing does the same, returning Content-Encoding header with the value UTF-8. Upon further investigation, I found a question on SO that matches my situation: https://stackoverflow.com/questions/17154967/is-content-encoding-being-set-to-utf-8-invalid
Both Chrome web browser and cURL command show the response correctly in such cases. However, Insomnia only shows an error: Error: Unrecognized or bad HTTP Content or Transfer-Encoding.
Reproduction Steps
- In Insomnia, you send a GET request to http://openapi.seoul.go.kr:8088/sample/xml/TbAdpWaitAnimalView/1/5/
- You confirm that an error occurs.
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
No response
Insomnia Version
v8.6.1
What operating system are you using?
macOS
Operating System Version
macOS 14.3.1(23D60)
Installation method
I can't remember.
Last Known Working Insomnia version
No response