anchor.diff:  	]).
   
   %%--------------------------------------------------------------------
  -%% Transport layer internal exports - don't call these directly!
  -%%--------------------------------------------------------------------
  --export([
  -	 send_proxy_request/4,
  -	 send_proxy_response/2,
  -	 send_result/5,
  -	 send_result/6
  -	 ]).
  -
  -%%--------------------------------------------------------------------
   %% Include files
   %%--------------------------------------------------------------------
   -include("sipsocket.hrl").
  
positive.code: 		    {"Content-Length", [integer_to_list(length(Body))]}],
      Response = #response{status=200, reason="OK",
  			 header=standardcopy(Header, ExtraHeaders), body=Body},
      send_response(Socket, Response).
  
  send_result(RequestHeader, Socket, Body, Status, Reason) ->
      Response = #response{status=Status, reason=Reason,
  			 header=standardcopy(RequestHeader, []), body=Body},
      send_response(Socket, Response).
  
  send_result(RequestHeader, Socket, Body, Status, Reason, ExtraHeaders) ->
      Response = #response{status=Status, reason=Reason,
  			 header=standardcopy(RequestHeader, ExtraHeaders), body=Body},
      send_response(Socket, Response).
  
  %%--------------------------------------------------------------------
  %% Function: send_proxy_response(Socket, Response)
  %%           Socket   = sipsocket record() | none
  %%           Response = response record()
  %% Descrip.: Extract the top Via from Response, and send this response
  %%           to that location (destination).
  %% Returns : {error, invalid_Via} |
  %%           SendResult
  %%           SendResult = term(), result of send_response()
  %%--------------------------------------------------------------------
  send_proxy_response(Socket, Response) when is_record(Response, response) ->
      case sipheader:via(Response#response.header) of
  	[_Self] ->
  	    logger:log(error,
  		       "Can't proxy response ~p ~s because it contains just one or less Via and that should be mine!",
  		       [Response#response.status, Response#response.reason]),
  	    {error, invalid_Via};
  	[_Self | Via] ->
  	    %% Remove Via matching me (XXX should check that it does)
  	    NewHeader = keylist:set("Via", sipheader:via_print(Via), Response#response.header),
  	    %% Now look for the correct "server transaction" to use when sending this response upstreams
  	    [_NextVia | _] = Via,
  	    NewResponse = Response#response{header=NewHeader},
  	    send_response(Socket, NewResponse)
      end.
  
  %%--------------------------------------------------------------------
  %% Function: make_response(Status, Reason, Body, ExtraHeaders,
  
negative.code: %%====================================================================
  %% External functions
  %%====================================================================
  
  %%--------------------------------------------------------------------
  %% Function: fix_content_length(Header, Body)
  