Skip to content
New issue

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

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

Already on GitHub? # to your account

HTTP Request node fails with quoted encodings. #11654

Open
pemontto opened this issue Nov 8, 2024 · 1 comment · May be fixed by #11655
Open

HTTP Request node fails with quoted encodings. #11654

pemontto opened this issue Nov 8, 2024 · 1 comment · May be fixed by #11655
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@pemontto
Copy link
Contributor

pemontto commented Nov 8, 2024

Bug Description

PR #9869 introduced a bug where HTTP responses that quote the encoding breaks the autodetected content.

n8n now tries to decode the content with the literal "utf-8" instead of utf-8.
image

Based on the RFC7231 quotes are allowed and expected:

   A parameter value that matches the token production can be
   transmitted either as a token or within a quoted-string.  The quoted
   and unquoted values are equivalent.  For example, the following
   examples are all equivalent, but the first is preferred for
   consistency:

     text/html;charset=utf-8
     text/html;charset=UTF-8
     Text/HTML;Charset="utf-8"
     text/html; charset="utf-8"

To Reproduce

Make an HTTP request with Response Format: Autodetect to a server that quotes the charset/encoding.

Expected behavior

Response is decoded with the unquoted string

Operating System

n8n docker image

n8n Version

1.51.0 to master

Node.js Version

n8n docker image

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Nov 8, 2024

Hey @pemontto,

We have created an internal ticket to look into this which we will be tracking as "GHC-411"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Nov 8, 2024
@pemontto pemontto linked a pull request Nov 8, 2024 that will close this issue
4 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants