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.
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.
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 ofutf-8
.Based on the RFC7231 quotes are allowed and expected:
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)