tjlp at sina.com
tjlp at sina.com
Sat Mar 4 15:57:51 UTC 2017
Actually I read what you mention. The document about "proxy_pass_header" just pass the headers listed in "proxy_hide_header" which do not include "Connection", so I think it might doesn't work. I will try this.
BTW, this module ngx_http_upstream_module should be built by default right, because the directive proxy_pass is supported by this module. My output of "nginx -V" doesn't not include this module.
----- 原始邮件 -----
发件人：Aleksandar Lazic <al-nginx at none.at>
收件人：tjlp at sina.com
抄送人：nginx <nginx at nginx.org>
Hi Liu Peng.
Am 04-03-2017 09:12, schrieb tjlp at sina.com:
> Hi, Alexks,
> I don't want to hide the header.
> My problem is that Nginx change the "Connection: close" header in the
> reponse from upstream server to "Connction: keep-alive" and send to
> client. I want to keep the original "Connection: close" header.
Ah that's a clear question.
It took us only 3 rounds to get to this clear question ;-)
So now the standard Questions from me:
What's the output of nginx -V ?
What's your config?
Maybe you have set 'keepalive' in the upstream config
as a last resort you can just pass the header with
Choose the solution which fit's to your demand.
I can only guess due to the fact that we don't know your config.
May I ask you to take a look into this document, which exists in several
languages, thank you very much.
> Liu Peng
> ----- 原始邮件 -----
> 发件人：Aleksandar Lazic <al-nginx at none.at>
> 收件人：tjlp at sina.com
> 抄送人：nginx <nginx at nginx.org>
> 日期：2017年03月03日 16点19分
> then one directive upward.
> Am 03-03-2017 06:00, schrieb tjlp at sina.com:
>> What I mention is the header in response from backend server. Your
>> answer about proxy_set_header is the "Connection" header in request.
>> Liu Peng
>> ----- 原始邮件 -----
>> 发件人：Aleksandar Lazic <al-nginx at none.at>
>> 收件人：nginx at nginx.org
>> 抄送人：tjlp at sina.com
>> 主题：Re: Issue about nginx removing the header "Connection" in HTTP
>> 日期：2017年03月03日 06点25分
>> Am 01-03-2017 08:29, schrieb tjlp at sina.com:
>>> 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
>>> 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 "";
>>> Liu Peng
>>> nginx mailing list
>>> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx