Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

example: adds http_body_chunk #421

Merged
merged 3 commits into from
Jan 2, 2024
Merged

Conversation

M4tteoP
Copy link
Member

@M4tteoP M4tteoP commented Dec 23, 2023

The PR provides an example of retrieving the request body chunk by chunk. Requires #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:

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

@M4tteoP M4tteoP marked this pull request as ready for review January 2, 2024 11:22
@M4tteoP M4tteoP requested a review from mathetake as a code owner January 2, 2024 11:22
@mathetake mathetake merged commit db22d5a into tetratelabs:main Jan 2, 2024
16 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants