<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hello,<br><br>I'm facing the following issue, when executing the following code with inets-5.9.3:<br><br><i>inets:start().<br>F = <br>    fun() -> <br>        io:format("Started thread~n"), <br>        [<br>           begin <br>               io:format("Response ~p~n", [httpc:request('get', {"http://nikitin.reksoft.ru:7080/TestErlang/testerlang", []}, [{version, "HTTP/1.1"}], [])]), <br>               timer:sleep(1000) <br>         end || _ <- lists:seq(1, 5)] end.<br><br>[spawn(F) || _ <- lists:seq(1, 500)].</i><br><br>According to the TCP traces everything is fine.<br>The HTTP/1.1 request:<br><br><i>GET /TestErlang/testerlang HTTP/1.1<br>te: <br>host: nikitin.reksoft.ru:7080<br>connection: keep-alive</i><br><br>The HTTP/1.1 response:<br><br><i>HTTP/1.1 404 Not Found<br>Server: Apache-Coyote/1.1<br>Content-Type: text/plain<br>Content-Length: 0<br>Date: Mon, 11 Feb 2013 15:15:31 GMT</i><br><br>But some of the reponses are formed wrongly in this way: <br><br>Response {ok,{{"HTTP/1.1",404,"Not Found"},<br>              [{"date","Mon, 11 Feb 2013 15:16:19 GMT"},<br>               {"server","Apache-Coyote/1.1"},<br>               {"content-length","0"},<br>               {"content-type","text/plain"}],<br>              "HTTP/1.1 404 Not Found\r\nServer: Apache-Coyote/1.1\r\nContent-Type: text/plain\r\nContent-Length: 0\r\nDate: Mon, 11 Feb 2013 15:16:19 GMT\r\n\r\nHTTP/1.1 404 Not Found\r\nServer: Apache-Coyote/1.1\r\nContent-Type: text/plain\r\nContent-Length: 0\r\nDate: Mon, 11 Feb 2013 15:16:19 GMT\r\n\r\n"}}<br><br>The bug can be reproduced in a multi-thread case only. Workaround: HTTP/1.1 server responds with some content body and content length is not zero.<br><br>Best Regards,<br>Anton Nikitin<br><br><br>                                          </div></body>
</html>