Closed M4tteoP closed 10 months ago
The PR provides an example of retrieving the request body chunk by chunk. Requires https://github.com/tetratelabs/proxy-wasm-go-sdk/pull/418, I will remove the draft status and rebase once (and if) #418 gets merged.
The http_body_chunk test provides logs to get a better understanding of how the body callbacks are behaving:
http_body_chunk
OnHttpRequestBody called. BodySize: 9, totalRequestBodyReadSize: 0, endOfStream: false read chunk size: 9, chunk: chunk1... OnHttpRequestBody called. BodySize: 18, totalRequestBodyReadSize: 9, endOfStream: false read chunk size: 9, chunk: chunk2... OnHttpRequestBody called. BodySize: 27, totalRequestBodyReadSize: 18, endOfStream: false read chunk size: 9, chunk: chunk3... OnHttpRequestBody called. BodySize: 50, totalRequestBodyReadSize: 27, endOfStream: false read chunk size: 23, chunk: chunk4 with pattern ... pattern found in chunk: 4 local 403 response sent
The PR provides an example of retrieving the request body chunk by chunk. Requires https://github.com/tetratelabs/proxy-wasm-go-sdk/pull/418, I will remove the draft status and rebase once (and if) #418 gets merged.
The
http_body_chunk
test provides logs to get a better understanding of how the body callbacks are behaving: