anchor.diff:                      {{error, {proxy_connection_failed, Reason}}, State}
               end,
               send_request(State2);
  -        {ok, http_eoh} ->
  -            {{error, {proxy_connection_refused, StatusCode, StatusText}}, State};
  +        #response{status_code = StatusCode, reason = Reason} ->
  +            {{error, {proxy_connection_refused, StatusCode, Reason}}, State};
           {error, closed} ->
               fusco_sock:close(Socket, ProxyIsSsl),
               {{error, proxy_connection_closed},
  
positive.code: %%------------------------------------------------------------------------------
  %% @private
  %%------------------------------------------------------------------------------
  read_proxy_connect_response(State, StatusCode, StatusText) ->
      Socket = State#client_state.socket,
      ProxyIsSsl = (State#client_state.proxy)#fusco_url.is_ssl,
      case fusco_sock:recv(Socket, ProxyIsSsl) of
          {ok, {http_response, _Vsn, Code, Reason}} ->
              read_proxy_connect_response(State, Code, Reason);
          {ok, {http_header, _, _Name, _, _Value}} ->
              read_proxy_connect_response(State, StatusCode, StatusText);
          {ok, http_eoh} when StatusCode >= 100, StatusCode =< 199 ->
              %% RFC 2616, section 10.1:
              %% A client MUST be prepared to accept one or more
              %% 1xx status responses prior to a regular
              %% response, even if the client does not expect a
              %% 100 (Continue) status message. Unexpected 1xx
              %% status responses MAY be ignored by a user agent.
              read_proxy_connect_response(State, nil, nil);
          {ok, http_eoh} when StatusCode >= 200, StatusCode < 300 ->
              %% RFC2817, any 2xx code means success.
              ConnectOptions = State#client_state.connect_options,
              SslOptions = State#client_state.proxy_ssl_options,
  
negative.code:             ?HTTP_LINE_END],
      case fusco_sock:send(Socket, ConnectRequest, Ssl) of
          ok ->
              {Reply, NewState} = read_proxy_connect_response(State),
              {reply, Reply, NewState};
          {error, closed} ->
              fusco_sock:close(Socket, Ssl),
  