anchor.diff:  check_infinite_response({1, Minor}, Hdrs) when Minor >= 1 ->
       HdrValue = dlhttpc_lib:header_value(<<"Connection">>, Hdrs, <<"keep-alive">>),
       case HdrValue of
  +        <<"Close">> -> ok;
           <<"close">> -> ok;
           _       -> erlang:error(no_content_length)
       end;
   check_infinite_response(_, Hdrs) ->
       HdrValue = dlhttpc_lib:header_value(<<"Connection">>, Hdrs, <<"close">>),
       case HdrValue of
  +        <<"Keep-Alive">> -> erlang:error(no_content_length);
           <<"keep-alive">> -> erlang:error(no_content_length);
           _            -> ok
       end.
  
positive.code:     end.
  
  maybe_close_socket(Socket, Ssl, {1, Minor}, ReqHdrs, RespHdrs) when Minor >= 1->
      ClientConnection = ?CONNECTION_HDR(ReqHdrs, "keep-alive"),
      ServerConnection = ?CONNECTION_HDR(RespHdrs, "keep-alive"),
      if
          ClientConnection =:= "close"; ServerConnection =:= "close" ->
              dlhttpc_sock:close(Socket, Ssl),
              undefined;
          ClientConnection =/= "close", ServerConnection =/= "close" ->
              Socket
      end;
  maybe_close_socket(Socket, Ssl, _, ReqHdrs, RespHdrs) ->
      ClientConnection = ?CONNECTION_HDR(ReqHdrs, "keep-alive"),
      ServerConnection = ?CONNECTION_HDR(RespHdrs, "close"),
      if
          ClientConnection =:= "close"; ServerConnection =/= "keep-alive" ->
              dlhttpc_sock:close(Socket, Ssl),
              undefined;
          ClientConnection =/= "close", ServerConnection =:= "keep-alive" ->
              Socket
      end.
  
negative.code:         undefined ->
              TransferEncoding =  dlhttpc_lib:header_value(<<"Transfer-encoding">>, Hdrs, "undefined"),
              case TransferEncoding of
                  <<"Chunked">> -> chunked;
                  <<"chunked">> -> chunked;
                  _         -> infinite
              end;
  