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

requests.get(url, { http2 = true }) 报错 #31

Open
tang24678 opened this issue Nov 27, 2019 · 1 comment
Open

requests.get(url, { http2 = true }) 报错 #31

tang24678 opened this issue Nov 27, 2019 · 1 comment

Comments

@tang24678
Copy link

tang24678 commented Nov 27, 2019

ngx.socket sslhandshake: expecting 1 ~ 5 arguments (including the object), but seen 6
stack traceback:
coroutine 0:
[C]: in function 'sslhandshake'
...penresty/luajit/share/lua/5.1/resty/requests/adapter.lua:352: in function <...penresty/luajit/share/lua/5.1/resty/requests/adapter.lua:324>
...penresty/luajit/share/lua/5.1/resty/requests/adapter.lua:691: in function 'send'
...penresty/luajit/share/lua/5.1/resty/requests/session.lua:212: in function 'get'
/home///lua/http2.lua:5: in main chunk, client: 10.18.., server: ...*, request: "GET /test_new2 HTTP/2.0", host:

@tokers
Copy link
Owner

tokers commented Nov 27, 2019

@tangchuanyang1991
Currently OpenResty's Cosocket sslhandshake method doesn't support the ALPN or NPN extension, I wrote a patch to support this, you should apply it to your own OpenResty bundle.

Please see https://github.com/tokers/lua-resty-http2/blob/master/util/lua-nginx-module-0.10.13-ssl-alpn.patch for the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants