Opened 9 years ago

Closed 9 years ago

#906 closed defect (duplicate)

Header duplicated in case of NGINX and NodeJS

Reported by: cecile.saintmartin@… Owned by:
Priority: major Milestone:
Component: nginx-core Version: 1.8.x
Keywords: header duplication Cc:
uname -a:
nginx -V: nginx/1.8.0

Description

We're using NGINX on 2 servers :
First one (Front server): NGINX + NodeJS
Second one (Backend server) : NGINX + other application

The request goes through the first server to the backend server, this part is Ok.
When the backend returned the reponse, NGINX add a "Vary" header.
Then the response goes back through NodeJS on the Front server. NodeJs lower case all headers (native behaviour) => the header "Vary" is transformed into "vary" (header name).
Then the response goes back on NGINX on the front server and NGINX add a second header "Vary".
So finally we have to headers : one "Vary" and one "vary".
This behaviour has been observed with other header : X-ForwardedFor for example.
So it seems that NGINX doesn't detect the existing header "vary" and add a new one.
We consider it as a bug because according to RFC, header names are case INSENSITIVE.

Change History (2)

comment:1 by Maxim Dounin, 9 years ago

Duplicate of #875.

comment:2 by Maxim Dounin, 9 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.