fail to deal with request header Expect: 100-Continue and respone
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- lua, nginx
- Domain
- networking
Research direction
Start in lib/resty/http.lua at the referenced lines around _handle_continue and the Expect header checks. Compare handling of case-insensitive Expect values, optional headers in 100 responses, and unsolicited 100 responses with the cited RFC sections. Done means all three reported cases are handled correctly and the existing tests or reproductions pass.
Written by the indexing model from the issue text.
Description
hi @pintsized ,
Bug 1
the following point is case sensitive,so if the value of request header Expect has some upper character,we will make mistake without handle_continue;
Bug 2
_handle_continue only try to read an empty line,but there is some oter optional headers like Date or Content-length. see rfc2616-10.1 Informational 1xx.
Bug 3
http.lua#L557 only handle continue response when Expect: 100-continue request header is there.but as the RFC 2616 say:
- An origin server SHOULD NOT send a 100 (Continue) response if
the request message does not include an Expect request-header
field with the "100-continue" expectation, and MUST NOT send a
100 (Continue) response if such a request comes from an HTTP/1.0
(or earlier) client.
see RFC2616#sec8.2.3.
It's SHOULD NOT requirement,it would be nice if we support it.
I have made a fix and tested it ok.
thanks.
- Dominant language
- Lua
- Stars
- 2.1k
- Forks
- 630
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
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.
More from ledgetech/lua-resty-http
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
ledgetech/lua-resty-http#337 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ledgetech/lua-resty-http#334 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ledgetech/lua-resty-http#330 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
ledgetech/lua-resty-http#325 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ledgetech/lua-resty-http#324 ·
All issues in ledgetech/lua-resty-http
Similar issues
-
ai-authored
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Data Correction Forever Needs testing/reproduction
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Questie/Questie#7941 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
remote remote-plugin
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day