Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to View Response When Server Returns Incorrect Content-Encoding Header #7161

Open
1 task done
youngminz opened this issue Mar 10, 2024 · 0 comments
Open
1 task done
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@youngminz
Copy link

Expected Behavior

For a better user experience, it would be beneficial if the behavior is changed as follows:

  1. 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.
  2. 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

  1. In Insomnia, you send a GET request to http://openapi.seoul.go.kr:8088/sample/xml/TbAdpWaitAnimalView/1/5/
  2. You confirm that an error occurs.

Is there an existing issue for this?

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

@youngminz youngminz added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

No branches or pull requests

1 participant