anchor.diff:      end.
   
   %% part of make_logstr/2
  -url2str({unparseable, _}) ->
  -    "unparseable";
  -url2str(URL) ->
  -    sipurl:print(URL).
  +url2str(URL) when is_record(URL, sipurl) ->
  +    sipurl:print(URL);
  +url2str({unparseable, URLstr}) when is_list(URLstr) ->
  +    "unparseable".
   
   %%--------------------------------------------------------------------
   %% Function: sanity_check_contact(Type, Name, Header)
  
positive.code: 		  E ->
  		    ST = erlang:get_stacktrace(),
  		    logger:log(error, "=ERROR REPORT==== from SIP message parser (stage 2) "
  			       "(in sipserver:parse_packet()) :~n~p, stacktrace : ~p", [E, ST]),
  		    %% pass the error on (will probably go unnoticed)
  		    erlang:error({caught_error, E, ST})
  	    end;
  
negative.code: 	(catch check_packet(CPacketRR1#response{header=CPacketRH5}, Origin2Str1)),
  
      autotest:mark(?LINE, "check_packet/2 response - 6"),
      %% Test response with totally invalid From: header
      CPacketRH6 = keylist:set("From", ["1"], CPacketRH1),
      {sipparseerror, response, CPacketRH6, 400, "Invalid From: header"} =
  	(catch check_packet(CPacketRR1#response{header=CPacketRH6}, Origin2Str1)),
  
      autotest:mark(?LINE, "check_packet/2 response - 7"),
      %% Test response with parsable From: but URL without closing ">"
      CPacketRH7 = keylist:set("From", ["<sip:test@example.org"], CPacketRH1),
      {sipparseerror, response, CPacketRH7, 400, "Invalid From: header"} =
  	(catch check_packet(CPacketRR1#response{header=CPacketRH7}, Origin2Str1)),
  
      autotest:mark(?LINE, "check_packet/2 response - 8"),
      %% Test strange To:. I think it is enough to test just one To: - that should suffice
      %% to tell that To: is checked the same way as From: (see tests above).
      CPacketRH8 = keylist:set("To", [WWWURL], CPacketRH1),
      {sipparseerror, response, CPacketRH8, 400, "Invalid To: header"} =
  	(catch check_packet(CPacketRR1#response{header=CPacketRH8}, Origin2Str1)),
  
  
      %% test process_parsed_packet(Request, Origin)
  