anchor.diff:              S = self(),
               spawn_link(fun() -> http_put_conn(SrcPath, DstUrl, S) end),
               receive
  -                ok -> P ! {S, ddfs_util, ok}, ok;
  -                {'EXIT', _, _} ->
  -                    P ! {S, ddfs_util, {error, crashed}}, ok;
  +                {'EXIT', _, _} -> P ! {S, ddfs_util, {error, crashed}}, ok;
                   E -> P ! {S, ddfs_util, E}, ok
               after Timeout ->
                   P ! {S, ddfs_util, {error, timeout}}, ok
  -            end,
  -            exit(die)
  +            end
           end),
       receive
           {Pid, ddfs_util, Reply} -> Reply
       end.
   
  --spec http_put_conn(nonempty_string(), nonempty_string(), pid()) -> _.
  +-spec http_put_conn(path(), nonempty_string(), pid()) -> _.
   http_put_conn(SrcPath, DstUrl, Parent) ->
       {_, Addr, Path, _, _} = mochiweb_util:urlsplit(lists:flatten(DstUrl)),
       {Host, Port} = parse_host(Addr),
  
positive.code:     send_body(Socket, IO).
  
  -spec read_response(port()) ->
      {'error', 'invalid_response'} | {'ok', [_]} | {'error', integer(), [_]}.
  read_response(Socket) ->
      {ok, RBin} = recv_all(Socket),
      Resp = binary_to_list(RBin),
  
negative.code: -export([http_put/3]).
  
  -include_lib("kernel/include/file.hrl").
  -include("ddfs.hrl").
  
  -define(CONNECT_TIMEOUT, 60000).
  -define(BUFFER_SIZE, 8192).
  
  -spec http_put(path(), nonempty_string(), integer()) ->
                        {'ok', binary()} | {'error', term()}.
  http_put(SrcPath, DstUrl, Timeout) ->
      % We use a middleman process to prevent messages received after timeout
      % reaching the original caller.
  