-
Nils Goroll authored
When VDP_DeliverObj() was not called, for example for a head request or a return code which implies no response body, bytes_tree->npending == 0 was not true. To avoid additional complications, we code the fact that the root node, if used, is pending into the npending_private field which meant for this purpose, but otherwise only accounts for nodes below it. Yet, this is not implied anywhere, so this use case should be perfectly fine. Also add a test for HEAD requests on an actual ESI object. Note on possible alternatives: I do not think a solution at VDP init time is possible because, after the vmod gets pushed from VCL, the response status could still be changed with effects on whether or not a response body is to be sent (e.g. changed from 200 to 204 after the VDP is pushed). So our only chance is to handle the case when the VDP gets called next after _init, which is just _fini.
348f3763