Opened 23 months ago
Closed 23 months ago
#2437 closed defect (invalid)
upstream sent invalid header
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | documentation | Version: | 1.22.x |
Keywords: | Cc: | lend.sp@… | |
uname -a: | Linux 77313d753af7 4.18.0-372.19.1.el8_6.x86_64 #1 SMP Tue Aug 2 13:42:59 EDT 2022 x86_64 GNU/Linux | ||
nginx -V: | nginx version: nginx/1.22.1 |
Description
2023/01/16 20:26:56 [error] 25#25: *77 upstream sent invalid header: "Bearer\x20..." while reading response header from upstream, client: c.c.c.c, server: xxx.com, request: "POST /obedesk/yyy/yyy HTTP/1.1", upstream: "https://n.n.n.n:p/obedesk/yyy/yyy", host: "xxx.com", referrer: "https://xxx.com/xxx/"
Versions 10.20.2 or lower work normally, but when I tested 10.22.1 I had this error, I tried several things but was unsuccessful.
Note:
See TracTickets
for help on using tickets.
Starting with version 1.21.1, nginx always rejects invalid headers, such as the one with space in a header name:
This applies to both headers received from clients, and headers got from upstream servers.
It looks like your backend server returns responses with an invalid header. Previously this worked, because nginx simply passed such headers to the client, but now such responses are rejected by nginx. To fix this, you have to fix the backend server to return correct responses.