Erlang lhttpc客户端错误

Erlang lhttpc客户端错误,erlang,Erlang,我尝试了lhttpc客户端,但出现了奇怪的错误: 7> lhttpc:request("https://money.yandex.ru",head,[],infinity). {ok,{{200,"OK"}, [{"Server","lighttpd/1.4.26"}, {"Date","Fri, 02 Sep 2011 20:29:02 GMT"}, {"Expires","Fri, 02 Sep 2011 20:29:02 GMT"}, {"Content-Type","

我尝试了lhttpc客户端,但出现了奇怪的错误:

7> lhttpc:request("https://money.yandex.ru",head,[],infinity).
{ok,{{200,"OK"},
 [{"Server","lighttpd/1.4.26"},
  {"Date","Fri, 02 Sep 2011 20:29:02 GMT"},
  {"Expires","Fri, 02 Sep 2011 20:29:02 GMT"},
  {"Content-Type","text/html; charset=windows-1251"},
  {"Cache-Control","max-age=0, proxy-revalidate"}],
 <<>>}}
8> lhttpc:request("https://money.yandex.ru",get,[],infinity). 
** exception exit: {{case_clause,{ok,<<"\r\n">>}},
                [{lhttpc_client,read_trailers,4},
                 {lhttpc_client,read_chunked_body,4},
                 {lhttpc_client,handle_response_body,4},
                 {lhttpc_client,read_response,4},
                 {lhttpc_client,execute,9},
                 {lhttpc_client,request,9}]}
 in function  lhttpc:request/9
7>lhttpc:请求(“https://money.yandex.ru“,头,[],无限大)。
{ok,{200,“ok”},
[{“服务器”,“lighttpd/1.4.26”},
{“日期”,“2011年9月2日星期五20:29:02 GMT”},
{“到期”,“2011年9月2日星期五20:29:02 GMT”},
{“内容类型”,“text/html;charset=windows-1251”},
{“缓存控制”,“最大年龄=0,代理重新验证”},
}}
8> lhttpc:请求(“https://money.yandex.ru,get,[],无穷大)。
**异常退出:{case_子句,{ok,}},
[{lhttpc_客户端,读取预告片,4},
{lhttpc_client,read_chunked_body,4},
{lhttpc_client,handle_response_body,4},
{lhttpc_客户端,读取响应,4},
{lhttpc_客户端,执行,9},
{lhttpc_客户端,请求,9}]}
在功能lhttpc中:请求/9

正如您所看到的,我首先尝试执行一个HEAD请求,但它没有问题,然后我发出了一个GET请求,但失败了。有没有人遇到过这个错误,也许有人知道如何修复它?

我解决了这个问题。似乎这不是lhttpc库的错误,而是Erlang本身的错误

似乎有时
erlang:decode_packet
函数在应该返回的时候不会返回
http_eoh


我使用从他们的git存储库克隆的R14B04 Erlang,这可能是一个原因。我没有时间深入研究,所以我修补了lhttpc本身。

您正在运行哪个版本的lhttpc?嗯。。。我真的不知道。我只是从esl和oscarh git repositaries克隆了两个版本。两个人都给了我同样的错误,我想是1.2.6。但是我找不到确切的位置。如果你有一个触发这个错误的样本包,我想邮件列表会很乐意看到它的!此外,如果您使用了稳定的R14B03标记,那么它应该与可在Erlang网页上下载的版本相同。