Skip to content

Commit

Permalink
Issue 378: Use http/1.0 for retrieving blobs from ddfs.
Browse files Browse the repository at this point in the history
There seems to be a bug in the erlang httpc client.  In certain cases, more than
one http request may be put on a single tcp connection.  When the server
responds to the http request, it closes the tcp connection and the http request
will be lost.
  • Loading branch information
Shayan Pooya committed Jan 9, 2014
1 parent 379ab60 commit 187c66c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion master/src/worker_utils.erl
Expand Up @@ -13,7 +13,8 @@ annotate_input({data, _} = I) ->
annotate_input({dir, {Host, DirUrl, []}}) ->
Url = disco:dir_to_url(DirUrl),
Fetch = try
{ok, {_S, _H, Content}} = httpc:request(Url),
{ok, {_S, _H, Content}} = httpc:request(get, {Url, []},
[{version, "HTTP/1.0"}], []),
{ok, Content}
catch K:V ->
lager:error("Error (~p:~p) fetching ~p (~p): ~p",
Expand Down

0 comments on commit 187c66c

Please sign in to comment.