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

fix(HTTP Request Node): Respect the original encoding of the incoming response #9869

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

netroy
Copy link
Member

@netroy netroy commented Jun 26, 2024

Summary

Almost all of our response handling code in nodes was ignoring the encoding defined on the content-type header. This PR updates all of this code to respect the encoding of the original document.

Before the fix:
image

After the fix:
image

PS: This does not fix the issue in v1 and v2 of the HttpRequest node. I tried, but it turned out to be too messy to be worth fixing.

Related Linear tickets, Github issues, and Community forum posts

Fixes #8799

Review / Merge checklist

  • PR title and summary are descriptive
  • Tests included

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request labels Jun 26, 2024
@netroy netroy marked this pull request as draft June 26, 2024 14:27
@NunoMiguelVeloso
Copy link

Looking forward to see this merged. Let me know if I can help.

@netroy netroy force-pushed the fix-8799-handle-response-encoding branch 2 times, most recently from 0ac803f to 4efe6f0 Compare July 11, 2024 14:03
@netroy netroy force-pushed the fix-8799-handle-response-encoding branch from 4efe6f0 to 662f914 Compare July 11, 2024 14:20
@netroy netroy marked this pull request as ready for review July 11, 2024 14:20
Copy link
Member

@elsmr elsmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice workflow tests 🙌

Copy link

cypress bot commented Jul 11, 2024

4 flaky tests on run #5886 ↗︎

0 399 0 0 Flakiness 4

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project: n8n Commit: 662f914ca6
Status: Passed Duration: 05:16 💡
Started: Jul 11, 2024 2:47 PM Ended: Jul 11, 2024 2:52 PM
Flakiness  5-ndv.cy.ts • 2 flaky tests

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Screenshots Video
NDV > Stop listening for trigger event from NDV Screenshots Video
Flakiness  10-undo-redo.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Undo/Redo > should undo/redo adding connected nodes Test Replay Screenshots Video
Flakiness  24-ndv-paired-item.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > resolves expression with default item when input node is not parent, while still pairing items Test Replay Screenshots Video

Review all test suite changes for PR #9869 ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@netroy netroy merged commit 2d19aef into master Jul 11, 2024
30 of 33 checks passed
@netroy netroy deleted the fix-8799-handle-response-encoding branch July 11, 2024 15:03
@github-actions github-actions bot mentioned this pull request Jul 17, 2024
@janober
Copy link
Member

janober commented Jul 17, 2024

Got released with [email protected]

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/improvement New feature or request Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP Request decode Mime Type: text/html; charset=ISO-8859-1
5 participants