lua-resty-http
lua-resty-http copied to clipboard
fail to deal with request header Expect: 100-Continue and respone
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.
@guanglinlv hi, can u publish your fix ?
Hi, yes I think Bug 1
isn't an issue, but if we're missing some details in _handle_continue
please do send a PR with some tests and I'll happily include them.