liseen / lua-resty-http

Lua http client driver for the ngx_lua based on the cosocket API
188 stars 70 forks source link

请求错误返回code:read status line failed read status line failed timeout #43

Open changtsing opened 8 years ago

changtsing commented 8 years ago

使用代码形式如下: local ok, code, headers, status, body =hc:request { url = url, method = "POST", body = postBody, headers = {["Content-Type"] = "application/x-www-form-urlencoded" } } 返回信息: code ='read status line failed read status line failed timeout' 服务端http状态码为499, 我看前面有这个提问,但是回复我的我没有理解意思。 麻烦看下这个问题吧,谢谢!

wendal commented 8 years ago

postBody的内容是什么?

changtsing commented 8 years ago

postBody= "key1="..value1.."&key2="..value2.."&key3="..value3,

value是string类型的字符串,

发件人: bounces+848413-8dfe-wangqing_chang=163.com@sgmail.github.com [mailto:bounces+848413-8dfe-wangqing_chang=163.com@sgmail.github.com] 代表 Wendal Chen 发送时间: 2016年8月21日 11:35 收件人: liseen/lua-resty-http lua-resty-http@noreply.github.com 抄送: 642336674 wangqing_chang@163.com; Author author@noreply.github.com 主题: Re: [liseen/lua-resty-http] 请求错误返回code:read status line failed read status line failed timeout (#43)

postBody的内容是什么?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/liseen/lua-resty-http/issues/43#issuecomment-241237026 , or mute the thread https://github.com/notifications/unsubscribe-auth/AUJG4D99T5yIwvPcUtK_RZL9pmMaKV_fks5qh8dsgaJpZM4JoQ1Y . https://github.com/notifications/beacon/AUJG4CjIhZ4Km-i6kGRgFXFkdw43vGQoks5qh8dsgaJpZM4JoQ1Y.gif

wendal commented 8 years ago

这样不行的, 你得给出确切可重现问题代码.

另外, 问题看上去是后端响应超时,而非lua库的原因

cswangs commented 3 years ago

我也遇到了这个错误, 本地curl请求访问没有问题. resty-http直接使用ip访问也没有问题,ip改成域名就开始报这个错误

wendal commented 3 years ago

dns超时了吧