anchor.diff:  parse_header(Socket, Timeout) -> parse_header(Socket, Timeout, #header{}).
   
   parse_header(Socket, Timeout, Header) ->
  +	log4erl:debug("xmlrpc http parse header"),	
       case gen_tcp:recv(Socket, 0, Timeout) of
   	{ok, "\r\n"} when Header#header.content_length == undefined ->
  +		log4erl:debug("xmlrpc http status 411"),	
   	    {status, 411};
   	{ok, "\r\n"} when Header#header.content_type == undefined ->
  +		log4erl:debug("xmlrpc http status 400"),	
   	    {status, 400};
   	{ok, "\r\n"} when Header#header.user_agent == undefined ->
  +		log4erl:debug("xmlrpc http status 400"),	
   	    {status, 400};
   	{ok, "\r\n"} -> {ok, Header};
   	{ok, HeaderField} ->
  -	    case string:to_lower(split_header_field(HeaderField)) of
  +		LowerHeaderField=string:to_lower(HeaderField),
  +		log4erl:debug("xmlrpc http header ok ~p", [LowerHeaderField]),
  +		Res=split_header_field(LowerHeaderField),
  +		log4erl:debug("xmlrpc http header analyze ~p", [Res]),
  +		case Res of
   		{"content-length:", ContentLength} ->
  +			log4erl:debug("xmlrpc http header content length ~p", [ContentLength]),	
   		    try
   				N = list_to_integer(ContentLength),
   			    parse_header(Socket, Timeout,
  
positive.code: 
  handle_payload(Socket, Timeout, Handler, State,
  	       #header{connection = Connection} = Header) ->
      case get_payload(Socket, Timeout, Header#header.content_length) of
  	{ok, Payload} ->
  	    ?DEBUG_LOG({encoded_call, Payload}),
  
negative.code: 
  -module(xmlrpc_http).
  -author('jocke@gleipnir.com').
  -export([handler/4, split_header_field/1]).
  
  -include("log.hrl").
  
  