Skip to content

Support reading header during handling bodies #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danielkwinsor opened this issue May 31, 2022 · 0 comments
Open

Support reading header during handling bodies #155

danielkwinsor opened this issue May 31, 2022 · 0 comments

Comments

@danielkwinsor
Copy link

Under version 0.1.4, I am using HttpContext to write logic on_http_request_headers and on_http_request_body (same for response).

I would like, when handling a body, to at least be able to read the headers of the associated request, through get_http_request_header. Instead, I get a panic panicked at 'unexpected status: 2' from proxy-wasm-0.1.4/src/hostcalls.rs:261:23

A specific use case is logging a body, but at the same time extracting and printing a traceId from header.

I see that #114 is similar; there may be cases where editing the headers even while handling the body may be valuable. However, that one is for editing, while this ticket might be limited to read-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant