anchor.diff:  			100 -> AnswerHeader4;
   			_ -> keylist:delete("Timestamp", AnswerHeader4)
   		    end,
  -    #response{status=Status, reason=Reason, header=AnswerHeader5, body=Body}.
  +    set_response_body(#response{status=Status, reason=Reason, header=AnswerHeader5}, Body).
   
   binary_make_message(BinLine1, Header, BinBody) when is_binary(BinLine1), is_record(Header, keylist),
   						    is_binary(BinBody) ->
       BinHeaders = sipheader:build_header_binary(Header),
       concat_binary([BinLine1, 13, 10, BinHeaders, 13, 10, BinBody]).
   
  +%%--------------------------------------------------------------------
  +%% Function: set_request_body(Request, Body)
  +%%           Request = request record()
  +%%           Body    = list() or binary()
  +%% Descrip.: Set the body of a request record.
  +%% Returns : NewRequest = request record()
  +%%--------------------------------------------------------------------
  +set_request_body(Request, Body) when is_record(Request, request), is_binary(Body) ->
  +    set_request_body(Request, binary_to_list(Body));
  +set_request_body(Request, Body) when is_record(Request, request), is_list(Body) ->
  +    ILen = length(Body),
  +    Len = integer_to_list(ILen),
  +    NewHeader = keylist:set("Content-Length", [Len], Request#request.header),
  +    Request#request{header=NewHeader, body=Body}.
  +
  +%%--------------------------------------------------------------------
  +%% Function: set_response_body(Request, Body)
  +%%           Request = request record()
  +%%           Body    = list() or binary()
  +%% Descrip.: Set the body of a request record, and calculate
  +%%           Content-Length.
  +%% Returns : NewRequest = request record()
  +%%--------------------------------------------------------------------
  +set_response_body(Response, Body) when is_record(Response, response), is_binary(Body) ->
  +    set_response_body(Response, binary_to_list(Body));
  +set_response_body(Response, Body) when is_record(Response, response), is_list(Body) ->
  +    ILen = length(Body),
  +    Len = integer_to_list(ILen),
  +    NewHeader = keylist:set("Content-Length", [Len], Response#response.header),
  +    Response#response{header=NewHeader, body=Body}.
   
   %%--------------------------------------------------------------------
   %% Function: test()
  
positive.code:     {TopViaHost, TopViaPort} = case sipheader:topvia(Header) of
  				   TopVia when is_record(TopVia, via) ->
  				       P = sipsocket:viaproto2proto(TopVia#via.proto),
  				       {TopVia#via.host, list_to_integer(default_port(P, TopVia#via.port))};
  				   _ ->
  				       {myhostname(), sipserver:get_listenport(Proto)}
  			       end,
  
negative.code: send_auth_req(Header, Socket, Auth, Stale) ->
      ExtraHeaders = [{"WWW-Authenticate",
  		     sipheader:auth_print(Auth, Stale)}],
      Response1 = #response{status=401, reason="Authentication Required",
  			  header=standardcopy(Header, ExtraHeaders)},
      Response = set_response_body(Response1, <<>>),
      transportlayer:send_response(Socket, Response).
  
  send_proxyauth_req(Header, Socket, Auth, Stale) ->
      ExtraHeaders = [{"Proxy-Authenticate",
  		     sipheader:auth_print(Auth, Stale)}],
      Response1 = #response{status=407, reason="Proxy Authentication Required",
  			  header=standardcopy(Header, ExtraHeaders)},
      Response = set_response_body(Response1, <<>>),
      transportlayer:send_response(Socket, Response).
  
  send_redirect(Location, Header, Socket) when is_record(Location, sipurl) ->
      Contact = contact:new(none, Location, []),
      ExtraHeaders = [{"Contact",
  		     sipheader:contact_print([Contact])}],
      Response1 = #response{status=302, reason="Moved Temporarily",
  			  header=standardcopy(Header, ExtraHeaders)},
      Response = set_response_body(Response1, <<>>),
      transportlayer:send_response(Socket, Response).
  
  send_notfound(Header, Socket) ->
      Response1 = #response{status=404, reason="Not found",
  			  header=standardcopy(Header, [])},
      Response = set_response_body(Response1, <<>>),
      transportlayer:send_response(Socket, Response).
  
  send_notavail(Header, Socket) ->
      ExtraHeaders = [{"Retry-After", ["180"]}],
      Response1 = #response{status=480, reason="Temporarily unavailable",
  			  header=standardcopy(Header, ExtraHeaders)},
      Response = set_response_body(Response1, <<>>),
      transportlayer:send_response(Socket, Response).
  
  send_answer(Header, Socket, Body) ->
      %% Remember to add a linefeed (\n) to the end of Body that you pass to this function
      ExtraHeaders = [{"Content-Type", ["application/sdp"]}],
      Response1 = #response{status=200, reason="OK",
  			  header=standardcopy(Header, ExtraHeaders)},
      Response = set_response_body(Response1, Body),
      transportlayer:send_response(Socket, Response).
  
  %%--------------------------------------------------------------------
  