[Varnish] #1497: Varnish 3.0.5 does not handle 204 No Content response from backend

Varnish varnish-bugs at varnish-cache.org
Tue May 6 23:27:50 CEST 2014


#1497: Varnish 3.0.5 does not handle 204 No Content response from backend
-----------------------------+--------------------
 Reporter:  oskar            |       Type:  defect
   Status:  new              |   Priority:  normal
Milestone:  Varnish 3.0 dev  |  Component:  build
  Version:  3.0.5            |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------
 I have a service that returns a 204 No Content response with response
 headers, newline, but no response body. Basically the response looks like
 this:

 {{{
 Escape character is '^]'.
 OPTIONS <someurl> HTTP/1.1
 Connection: close

 HTTP/1.1 204 No Content
 X-Powered-By: Express
 Access-Control-Allow-Methods: GET,HEAD,PUT,POST,DELETE
 Date: Tue, 06 May 2014 21:20:46 GMT
 Connection: close

 Connection closed by foreign host.
 }}}

 But Varnish instead returns 503 Service Unavailable. This is what is
 logged:

 {{{
     3 SessionOpen  c 127.0.0.1 38740 :6081
     3 ReqStart     c 127.0.0.1 38740 1170395206
     3 RxRequest    c OPTIONS
     3 RxURL        c <someurl>
     3 RxProtocol   c
     3 RxHeader     c User-Agent: Wget/1.15 (linux-gnu)
     3 RxHeader     c Accept: */*
     3 RxHeader     c Host: ...
     3 RxHeader     c Connection: close
     3 VCL_call     c recv pass
     3 VCL_call     c hash
     3 Hash         c <someurl>
     3 Hash         c account.psplugin.com
     3 VCL_return   c hash
     3 VCL_call     c pass pass
     3 Backend      c 25 nodejs_director nodejs_app1
     3 FetchError   c http first read error: -1 0 (Success)
     3 VCL_call     c error deliver
     3 VCL_call     c deliver deliver
     3 TxProtocol   c HTTP/1.1
     3 TxStatus     c 503
     3 TxResponse   c Service Unavailable
     3 TxHeader     c Server: Varnish
     3 TxHeader     c Content-Type: text/html; charset=utf-8
     3 TxHeader     c Retry-After: 5
     3 TxHeader     c Content-Length: 419
     3 TxHeader     c Accept-Ranges: bytes
     3 TxHeader     c Date: Tue, 06 May 2014 20:52:46 GMT
     3 TxHeader     c Age: 0
     3 TxHeader     c Connection: close
     3 TxHeader     c X-Cache: MISS
     3 Length       c 419
     3 ReqEnd       c 1170395206 1399409566.629074335 1399409566.630136251
 0.000033617 0.001033306 0.000028610
 }}}

 Regards,

 Oskar Liljeblad

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



More information about the varnish-bugs mailing list