• Nils Goroll's avatar
    Move HSH_Cancel() to VDP_Close() to bring it under transport control · ab0214c8
    Nils Goroll authored
    Transports should be free to keep a reference on the object to be
    delivered until after their transport function returns, but
    HSH_Cancel() in cnt_transmit() prevented the object from being of any
    use for the case that it is final (pass/hfm/hfp).
    
    We solve this by moving the HSH_Cancel() close to VDP_Close, which
    also makes sense from the perspective of the VDP design: Until the VDP
    close, filters could still reference object data.
    
    HSH_Cancel() needs the objcore, which could be reachable also via
    vdc->req. But that member is unset in VDP_DeliverObj(), presumably to
    make it clear that VDP .bytes callbacks should not access request
    data. Thus, we pass it as a new argument to VDP_Close() as well as any
    boc being held by the caller.
    
    The objcore can also be NULL for the case where a transport generates
    the body without holding an objcore at all.
    ab0214c8
cache_http2_deliver.c 8.53 KB