BUG found

Satoshi Abe a3104 at accelia.net
Wed Feb 17 14:15:26 CET 2010


Dear varnish developpers.

I found the bug.

I use ESI function  by HTTP 1.0. I send http-request with "Connection:
keep-alive" header.
When the content length is not understood, it is necessary to close
the connection in HTTP/1.0 or less.

However, varnish returned "Connection: keep-alive", and keep the connection.
Then, HTTP-Client is waited for until the time-out because the end of
contents is not understood.

I hope to add the following codes to correct this bug.

cache_response.c  line 144

                // Http 1.0 should be connection close. by a3104
                if (sp->http->protover <= 1.0){
                        sp->doclose = "Connection: close";
                }


------
        /* Only HTTP 1.1 can do Chunked encoding */
        if (!sp->disable_esi && !VTAILQ_EMPTY(&sp->obj->esibits)) {
                http_Unset(sp->http, H_Content_Length);
                if(sp->http->protover >= 1.1)
                        http_PrintfHeader(sp->wrk, sp->fd, sp->http,
"Transfer-Encoding: chunked");

                // Http 1.0 should be disconnect http session. by a3104
                if (sp->http->protover == 1.0){
                        sp->doclose = "Connection: close";
                }
        }

------------
Thanks and regards.



More information about the varnish-bugs mailing list