503 backend error after backends reponds with 204 without a body

Wido den Hollander wido at widodh.nl
Tue Oct 6 20:29:46 CEST 2015


Hi,

I've upgraded to Varnish 4.1.0 today on a system where there is Ceph's
RADOS Gateway [0] running with the embedded Civetweb [1] webserver.

When a client sends a DELETE command the backend responds with a HTTP
204 without a body, but this causes Varnish to throw a 503 backend error.

-6- BerespProtocol HTTP/1.1
-6- BerespStatus   204
-6- BerespReason   No Content
-6- BerespHeader   Bucket: "widodh"
-6- BerespHeader   Content-type: application/xml
-6- BerespHeader   Content-Length: 0
-6- BerespHeader   Date: Tue, 06 Oct 2015 18:23:07 GMT

And Varnish then says:

-6- Error          Body cannot be fetched
-6- Timestamp      Error: 1444155787.622126 0.175832 0.000177
-6- BerespProtocol HTTP/1.1
-6- BerespStatus   503
-6- BerespReason   Service Unavailable
-6- BerespReason   Backend fetch failed
-6- BerespHeader   Date: Tue, 06 Oct 2015 18:23:07 GMT
-6- BerespHeader   Server: Varnish
-6- VCL_call       BACKEND_ERROR

Reading the HTTP specification [2] I found this:

"The 204 response MUST NOT include a message-body, and thus is always
terminated by the first empty line after the header fields."

I can probably catch this in vcl_backend_response, pass to vcl_synth and
come up with a proper response to the client, but is that the way to go?

Is this a bug in Varnish or is it keeping to the RFCs?

Thanks,

Wido

[0]: http://docs.ceph.com/docs/master/radosgw/
[1]: https://github.com/civetweb/civetweb
[2]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html



More information about the varnish-misc mailing list