ProxymanApp / ProxymanApp/Proxyman
Response XML formatting tab doesn't work when response charset is not UTF-8
@NghiaTranUIT is already working on this.
Since Sep 10, 2021.
- 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
servenpm 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
servercommand - Open the corresponding responses in proxyman
Observed behavior
- The xml response tab correctly formats for the
response.xmlrequest ✅ - The xml response tab displays "Invalid XML Data" for the
response.ISO-8859-1.xmlinstead of the actual data 🚫
Expected behavior
Both XML responses should be formatted correcly
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.