Webhook response headers not cased properly when replying to webhooks

Describe the issue/error/question

When putting is a response header “Validation-Token” the webhook is replying back with “validation-token” in lowercase. The service I am responding to needs this to be cased exactly and because it’s lower case, it’s not working

What is the error message (if any)?

Please share the workflow

Share the output returned by the last node

I would expect the response headers to have “Validation-Token” not "validation-tooken

Information on your n8n setup

  • n8n version: Version 1.6.0 (1.6.0)
  • Database you’re using (default: SQLite): SQlite
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: desktop app

Hi @probable, welcome to the community!

I am very sorry to hear you’re having trouble. Iirc this is intentional behaviour allowing users to overwrite headers n8n would otherwise send by default. Perhaps @RicardoE105 can confirm the exact details around this and might know of a suitable workaround?

That said, HTTP header names are case-insensitive by specification (this is for example described here: An HTTP header consists of its case-insensitive name). A lot of clients auto-convert header names these days accordingly, I believe this is in preparation for HTTP/2 (discussed here: HTTP/2 encodes HTTP headers as lowercase. HTTP/1.1 headers were already case-insensitive, but not everbody adhered to that rule.).

So you might also want to reach out to the organization requiring a specific letter case for your header and ask them to change this behavior.

2 Likes

It actually turned out to be something completely different and I misread the documentation of the API tha I was ingesting and that I needed for N8N to reply back with a validation-token that they send on the request.