ProxymanApp / ProxymanApp/Proxyman

Response XML formatting tab doesn't work when response charset is not UTF-8

Open
#989 3 comments 0 reactions 1 assignee View on GitHub

@NghiaTranUIT is already working on this.

Since Sep 10, 2021.

✅ Done bug
Dominant language
No language data
Stars
7k
Forks
237
PR merge metrics
No merged PRs in 30d

Description

Description

When inspecting XML responses encoded in ISO-8859-1 charset (and probably any encoding other than UTF-8) , the XML formatting tab displays "Invalid XML Data" instead of the actual XML Data.

This happens even tough the content-type header properly specifies the response charset:

Content-Type: text/xml;charset=ISO-8859-1
Possible root cause

The charset parameter in the content-type HTTP response header is probably ignored and the response is wrongly interpreted as UTF-8.

Proxyman version

Version 2.32.1 (23210)

macOS Version

mac 11.5.2

Steps to reproduce

The attached test-charset.tar.gz archive contains one UTF-8-encoded XML file and one ISO-8859-1-encoded xml file.

It also contains a simple node project that uses the serve npm module that creates a local http server serving the two files with their correct charset set in the content-type header.

  • Install node.js on your local computer.
  • Download the following node project: test-charset.tar.gz
  • Untar the archive:
tar xfz ./test-charset.tar.gz
  • Install node dependencies (the serve npm module, actually)
npm install
  • Launch the local web server
npx serve
  • Launch proxyman
  • In another terminal, run the following two commands:
curl --proxy "http://localhost:9090"  http://0.0.0.0:5000/response.xml
curl --proxy "http://localhost:9090"  http://0.0.0.0:5000/response.ISO-8859-1.xml
  • Kill the server command
  • Open the corresponding responses in proxyman
Observed behavior
  • The xml response tab correctly formats for the response.xml request ✅
  • The xml response tab displays "Invalid XML Data" for the response.ISO-8859-1.xml instead of the actual data 🚫
Expected behavior

Both XML responses should be formatted correcly

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.