Unable to maintain a persistent connection between nginx and upstream

configure the following, but cannot maintain a persistent connection (viewing the log file by configuring the log file $sent_http_connection, is always close);
, what"s the problem? Thank you.

http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  "$sent_http_connection";

    access_log  logs/access.log  main;

    sendfile        on;

    keepalive_timeout  65;

    upstream http_backend {

        server 127.0.0.1:8002;

        keepalive 16;

    }
    server {
        listen       8001;
        location /http/ {

            proxy_pass http://http_backend;

            proxy_http_version 1.1;

            proxy_set_header Connection "";


        }
Jun.21,2021

curl 127.0.0.1:8002/http/-o / dev/null-s-D-
look at the output of this


proxy_http_version 1.1;
proxy_set_header Connection ";

Menu