anchor.diff:          {"Accept-Encoding", "identity"},
           {"Accept-Charset", "UTF-8;q=1.0, ISO-8859-1;q=0.5, *;q=0"},
           {"Accept-Language", "en,*;q=0"},
  -        {"User-Agent", httpc_ua(Url)},
  -        {"Connection", "close"}
  +        {"User-Agent", httpc_ua(Url)}
       ] ++ case Max of
               undefined -> [];
               _ -> [ {"Range", "bytes=0-"++integer_to_list(Max-1)} ]
  
positive.code:     {ok, {Url, Hs, Size, Data}};
  maybe_redirect({416, _Hs, _Size, _Data}, Url, RedirectCount, _Max, OutDev, Opts) ->
      fetch_partial(Url, RedirectCount+1, undefined, OutDev, Opts);
  maybe_redirect({Code, Hs, _Size, _Data}, BaseUrl, RedirectCount, Max, OutDev, Opts) 
      when Code =:= 301; Code =:= 302; Code =:= 303; Code =:= 307 ->
      case proplists:get_value("location", Hs) of
          undefined -> 
              {error, no_location_header};
          Location -> 
              NewUrl = z_convert:to_list(z_url:abs_link(Location, BaseUrl)),
              fetch_partial(NewUrl, RedirectCount+1, Max, OutDev, Opts)
      end;
  
negative.code:         {http, {_ReqId, {{_V, Code, _Msg}, Hs, Data}}} ->
              {ok, {Code, Hs, 0, Data}}
      after ?HTTPC_TIMEOUT ->
          httpc:cancel_request(ReqId),
          {error, timeout}
      end;
  fetch_stream({error, _} = Error, _Max, _OutDev) ->
  