Skip to content

Commit 530fc81

Browse files
authored
Add more comment on SendHttpResponse. (tetratelabs#186)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
1 parent a87a3fe commit 530fc81

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

proxywasm/hostcall.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ func ResumeHttpResponse() error {
473473
// Also please note that this cannot be used after types.HttpContext.OnHttpResponseHeaders returns Continue
474474
// since in that case, the response headers may have already arrived at the downstream and there is no way
475475
// to override the already sent headers.
476+
// types.Action.Pause *must* be returned after invoking this function, in order to stop further processing
477+
// of original http request/response.
476478
func SendHttpResponse(statusCode uint32, headers [][2]string, body []byte) error {
477479
shs := internal.SerializeMap(headers)
478480
var bp *byte

0 commit comments

Comments
 (0)