anchor.diff:  
   handle_payload(Socket, Timeout, Handler, State,
   	       #header{connection = Connection} = Header) ->
  +	log4erl:debug("xmlrpc http handle payload"),	
       case get_payload(Socket, Timeout, Header#header.content_length) of
   	{ok, Payload} ->
   	    ?DEBUG_LOG({encoded_call, Payload}),
  
positive.code: parse_header(Socket, Timeout) -> parse_header(Socket, Timeout, #header{}).
  
  parse_header(Socket, Timeout, Header) ->
      case gen_tcp:recv(Socket, 0, Timeout) of
  	{ok, "\r\n"} when Header#header.content_length == undefined ->
  	    {status, 411};
  	{ok, "\r\n"} when Header#header.content_type == undefined ->
  	    {status, 400};
  	{ok, "\r\n"} when Header#header.user_agent == undefined ->
  	    {status, 400};
  	{ok, "\r\n"} -> {ok, Header};
  	{ok, HeaderField} ->
  	    case string:to_lower(split_header_field(HeaderField)) of
  		{"content-length:", ContentLength} ->
  		    try
  				N = list_to_integer(ContentLength),
  			    parse_header(Socket, Timeout,
  
negative.code: 				_ -> {status, 400}
  			end;
  		{"content-type:", "text/xml"} ->
  			log4erl:debug("xmlrpc http header content type text/xml"),	
  		    parse_header(Socket, Timeout,
  				 Header#header{content_type = "text/xml"});
  		{"content-type:", _UnknownContentType} -> 
  			log4erl:debug("xmlrpc http header content type unknown"),	
  			{status, 415};
  		{"user-agent:", UserAgent} ->
  			log4erl:debug("xmlrpc http header content type user agent ~p", [UserAgent]),	
  		    parse_header(Socket, Timeout,
  				 Header#header{user_agent = UserAgent});
  		{"connection:", "close"} ->
  			log4erl:debug("xmlrpc http header connection close"),	
  		    parse_header(Socket, Timeout,
  				 Header#header{connection = close});
  		{"connection:", [_,$e,$e,$p,$-,_,$l,$i,$v,$e]} ->
  			log4erl:debug("xmlrpc http header connection"),	
  		    parse_header(Socket, Timeout,
  				 Header#header{connection = undefined});
  		_ ->
  			log4erl:debug("xmlrpc http header other"),				
  		    ?DEBUG_LOG({skipped_header, HeaderField}),
  		    parse_header(Socket, Timeout, Header)
  	    end; 
  	{error, Reason} -> 
  		log4erl:debug("xmlrpc http header error ~p", [Reason]),	
  		{error, Reason}
      end.
  
  split_header_field(HeaderField) -> split_header_field(HeaderField, []).
  