[Varnish] #1613: keep-alive is enabled even if req.http.Connection is set to "close"

Varnish varnish-bugs at varnish-cache.org
Mon Oct 20 16:36:08 CEST 2014


#1613: keep-alive is enabled even if req.http.Connection is set to "close"
----------------------+----------------------
 Reporter:  zviratko  |       Type:  defect
   Status:  new       |   Priority:  normal
Milestone:            |  Component:  varnishd
  Version:  4.0.1     |   Severity:  normal
 Keywords:            |
----------------------+----------------------
 Relevant part of VCL (tried as workaround for #1612):

 sub vcl_recv {
     if (!req.http.Connection ~ "keep-alive") {
         set req.http.Connection = "close";
     }
 }

 varnishlog shows Connection: close header (not present in the original
 request)
 but still uses keep-alive on response

 *   << Request  >> 229454
 -   Begin          req 229452 rxreq
 -   Timestamp      Start: 1413815519.025922 0.000000 0.000000
 -   Timestamp      Req: 1413815519.759714 0.733793 0.733793
 -   ReqStart       10.1.0.1 53459
 -   ReqMethod      GET
 -   ReqURL         /aden_prace/ad/86e3d6a0-239f-4cef-a52a-
 f50978c3fd95/orders/item
 -   ReqProtocol    HTTP/1.1
 -   ReqHeader      Host: aden
 -   ReqHeader      X-Forwarded-For: 10.1.0.1
 -   VCL_call       RECV
 -   ReqHeader      X-Hash-Key: 10.1.0.1
 -   ReqHeader      Connection: close
 -   VCL_acl        MATCH lbaden "10.0.36.222"
 -   ReqHeader      X-VIP: aden
 -   ReqHeader      X-Rule: setbackendaden;
 -   VCL_acl        NO_MATCH lbasmt
 -   VCL_acl        NO_MATCH lblang
 -   VCL_acl        NO_MATCH lbswift
 -   VCL_return     hash
 -   VCL_call       HASH
 -   VCL_return     lookup
 -   Debug          "XXXX HIT-FOR-PASS"
 -   HitPass        2147745808
 -   VCL_call       PASS
 -   VCL_return     fetch
 -   Link           bereq 229455 pass
 -   Timestamp      Fetch: 1413815519.766031 0.740109 0.006316
 -   RespProtocol   HTTP/1.1
 -   RespStatus     200
 -   RespReason     OK
 -   RespHeader     Server: Apache-Coyote/1.1
 -   RespHeader     Cache-Control: no-cache, no-transform
 -   RespHeader     Content-Type: text/plain
 -   RespHeader     Date: Mon, 20 Oct 2014 14:31:59 GMT
 -   RespHeader     X-BE: aden01
 -   RespHeader     X-Varnish: 229454
 -   RespHeader     Age: 0
 -   RespHeader     Via: 1.1 varnish-v4
 -   VCL_call       DELIVER
 -   RespHeader     X-Vokurka: not found!
 -   RespHeader     X-Server: Skrutener Zviratko 31.5
 -   VCL_return     deliver
 -   Timestamp      Process: 1413815519.766071 0.740149 0.000040
 -   Debug          "RES_MODE 2"
 -   RespHeader     Connection: keep-alive
 -   RespHeader     Accept-Ranges: bytes
 -   Timestamp      Resp: 1413815519.766112 0.740190 0.000041
 -   Debug          "XXX REF 1"
 -   ReqAcct        92 0 92 314 0 314
 -   End

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1613>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list