Issue about nginx removing the header "Connection" in HTTP response?

Aleksandar Lazic al-nginx at
Thu Mar 2 22:25:11 UTC 2017

Am 01-03-2017 08:29, schrieb tjlp at

> Hi, nginx guy,
> In our system, for some special requests, the upstream server will 
> return a response which the header includes "Connection: Close".
> According to HTTP protocol, "Connection" is one-hop header.
> So,  nginx will remove this header and the client can't do the business 
> logic correctly.
> How to handle this scenario?

you mean something like this?

  If the value of a header field is an empty string then this field will 
not be passed to a proxied server:

    proxy_set_header Connection "";

> Thanks
> Liu Peng
> _______________________________________________
> nginx mailing list
> nginx at

More information about the nginx mailing list