Skip to content
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

Question: 100-continue response timeout? #173

Open
zhangcunli opened this issue Mar 1, 2019 · 2 comments
Open

Question: 100-continue response timeout? #173

zhangcunli opened this issue Mar 1, 2019 · 2 comments
Labels

Comments

@zhangcunli
Copy link

If http header contain “Expect": 100-contiue, and the server not response 100 OK.
Then the lua-resty-http will block here:

local function _handle_continue(sock, body)
    local status, version, reason, err = _receive_status(sock) --luacheck: no unused
    ///block here....
    if not status then
        return nil,nil,nil, err
    end

How to do?

@zhangcunli
Copy link
Author

I think a 100-continue timeout interface is required.

@astromechza
Copy link

We've just hit exactly the same issue here.
According to HTTP 1.1 spec documents:

Because of the presence of older implementations, the protocol allows
   ambiguous situations in which a client may send "Expect: 100-
   continue" without receiving either a 417 (Expectation Failed) status
   or a 100 (Continue) status. Therefore, when a client sends this
   header field to an origin server (possibly via a proxy) from which it
   has never seen a 100 (Continue) status, the client SHOULD NOT wait
   for an indefinite period before sending the request body.

So I agree this can be seen as a bug.

@pintsized pintsized added the bug label Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants