add guards on set_resp_body_fun for streamlen and streamfun