cache_req{,_fsm}: Add resp.storage control over synth body's storage
draft PR of WIP for early review / feedback opportunities.
Next steps (planned, do not nail me down on this)
- same change for beresp - will postpone because of #4359
- add
beresp.filters - change
VRT_l_{,be}resp_body()to write directly to the {body,vfp} without the VSB de-tour - add special-purpose
ssy(synth) storage to remove last remaining memcpy forvcl_synth {}use
This adds the vcl variable resp.storage, available from vcl_synth {} to control which storage the synth response body gets created on.
Rather than just remembering the stroage for use after VCL has returned, we actually create an object on it when the variable changes.
This is the first step towards #4344
Bugwash: Does Resp_l_storage() exist for a could reason or could we use just the VRT_ functions?
Bugwash: Does
Resp_l_storage()exist for a could reason or could we use just theVRT_functions?
The answer is that we do not have a VRT_CTX in cnt_synth, because we only create it in the "fsm wrapper" VCL_*_method, but we need to call the "set the default storage" function from cnt_synth in case VCL has not set (or unset) the storage.