openresty / openresty/lua-nginx-module
echo "HTTP/1.1 100 Continue" before any response data to downstream
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
Hello!
Recently I found some HTTP client (like curl) will complain "Illegal or missing hexadecimal sequence in chunked-encoding" when sending request to OpenResty which has some configurations like this:
location / {
content_by_lua_block {
ngx.print("hello")
}
}
Sends request like this:
curl -v http://127.0.0.1:8080/ --upload-file /path/to/file
When I discard the request body explicitly (ngx.req.discard_body). Everything is OK.
I'm not sure whether this is the callers' responsibility to discard the request body explicitly. Or ngx_lua can do this implicitly (send HTTP/1.1 100 Continue before any data). What's your opinion?
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
Reproduce the issue with the shown curl --upload-file request and the content_by_lua_block using ngx.print, then compare it with the explicit ngx.req.discard_body case. Read the request-body and response handling entry points around these APIs and clarify the expected HTTP behavior; done means an agreed handling path with a regression test for the reported client failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua, nginx
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100