openresty / openresty/lua-nginx-module
how to parse the request header information for http 2.0?
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
As shown below,I want to parse the header information for http 2.0,It doesn't feel like it's working。
Can you help me see why?
`
server {
listen 8081 http2;
set $target_url '127.0.0.1:8098' ;
location / {
content_by_lua_block{
ngx.log(ngx.ERR, 'access ')
local headers = ngx.req.get_headers()
for k, v in pairs(headers) do
ngx.log(ngx.ERR,"headerK = "..k..' value = '..v)
ngx.say("headerK = "..k..' value = '..v)
end
}
grpc_pass grpc://$target_url;
}
}
`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The example uses an nginx server block with an HTTP/2 listener and calls ngx.req.get_headers() inside content_by_lua_block; start by reproducing the configuration and inspecting the ngx.log output. Done means identifying why the request headers are not available as expected and confirming the behavior with a focused reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100