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

response encoding error when use XmlHttpRequest #783

Closed
Mas0nShi opened this issue Feb 23, 2023 · 1 comment · Fixed by #784
Closed

response encoding error when use XmlHttpRequest #783

Mas0nShi opened this issue Feb 23, 2023 · 1 comment · Fixed by #784
Labels
bug Something isn't working

Comments

@Mas0nShi
Copy link
Contributor

Describe the bug
response encoding error when use XmlHttpRequest

To Reproduce
we need to compatible encoding e.g. 'gbk'

const window = new Window(), document = window.document;
const xhr = new window.XMLHttpRequest();
xhr.open("GET", "https://blog.shi1011.cn", true);
xhr.send();

xhr.onload = function() {
	console.log(xhr.responseText);
}
@Mas0nShi Mas0nShi added the bug Something isn't working label Feb 23, 2023
Mas0nShi added a commit to Mas0nShi/happy-dom that referenced this issue Feb 23, 2023
Mas0nShi added a commit to Mas0nShi/happy-dom that referenced this issue Feb 23, 2023
Mas0nShi added a commit to Mas0nShi/happy-dom that referenced this issue Feb 23, 2023
capricorn86 added a commit that referenced this issue Feb 24, 2023
…se-encoding

#783@patch: Fixes XMLHttpRequest response encoding error.
@capricorn86
Copy link
Owner

Thanks again for the contribution @Mas0nShi! 🌟

We can add unit tests later. The current unit tests are passing, which means that nothing essential should break.

You can read more about the release here:
https://github.com/capricorn86/happy-dom/releases/tag/v8.7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants