Proxy wasm set http response body when original response does not have a body
Seems that the on_http_response_body callback is not called when the original response does not include a body.
Because of this, I don't see a way of setting a different body, except for using send_http_response from a different callback.
Should the api trigger the callback with body_size = 0 in this case?
cc @mpwarres
The on_http_response_headers callback should already give clear signal as to whether or not a body is expected, via the end_of_stream bool param. If end_of_stream == true, then the plugin shouldn't expect an on_http_response_body callback; IMO that would be a little surprising, since the on_http_response_headers callback already indicated the stream ended.
A plugin should be able to call send_http_response from the on_http_response_headers callback in cases like this. That could be warranted anyways, to allow changing of the HTTP response code for the response.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.