anchor.diff:  	    {error, missing_content_length};
   	{ok, "\r\n"} -> {ok, Header};
   	{ok, HeaderField} ->
  -	    case string:tokens(HeaderField, " \r\n") of
  -		["Content-Length:", ContentLength] ->
  +	    case string:tokens(string:to_lower(HeaderField), " \r\n") of
  +		["content-length:", ContentLength] ->
   		    case catch list_to_integer(ContentLength) of
  -			badarg -> 
  +			badarg ->
   				{error, {invalid_content_length, ContentLength}};
   			Value ->
   			    parse_header(Socket, Timeout, SslOption,
   					 Header#header{content_length =
   						       Value})
   		    end;
  -		["Connection:", "close"] ->
  +		["connection:", "close"] ->
   		    parse_header(Socket, Timeout, SslOption,
   				 Header#header{connection = close});
  -		["X-Forwarded-For:", XForwardedFor] ->
  +		["x-forwarded-for:", XForwardedFor] ->
   		    parse_header(Socket, Timeout, SslOption,
   				 Header#header{xforwardedfor = XForwardedFor});
  -		["Authorization:", Authorization] ->
  +		["authorization:", Authorization] ->
   		    parse_header(Socket, Timeout, SslOption,
   				 Header#header{authorization = Authorization});
  -		["Cookie:", Cookie] ->
  +		["cookie:", Cookie] ->
   			Cookies = [ Cookie | Header#header.cookies ],
   		    parse_header(Socket, Timeout, SslOption,
   				 Header#header{cookies = Cookies});
  
positive.code: 	end.
  
  send(Socket, URI, false, Payload, ExtraHeader, SslOption) ->
  	send(Socket, URI, lists:flatten(["Connection: close\r\n" | ExtraHeader]), Payload, SslOption);
  send(Socket, URI, true, Payload, ExtraHeader, SslOption) -> 
  	send(Socket, URI, ExtraHeader, Payload, SslOption).
  
  send(Socket, URI, Header, Payload, SslOption) ->
      Request =
  	["POST ", URI, " HTTP/1.1\r\n",
  	 "Content-Length: ", integer_to_list(lists:flatlength(Payload)),
  	 "\r\n",
  	 "User-Agent: Erlang XML-RPC Client 1.13\r\n",
  	 "Content-Type: text/xml\r\n",
  	 Header, "\r\n",
  	 Payload],
  	M = fetch_comm_module(SslOption),
  	apply(M, send, [Socket, Request]).
  
  parse_response(Socket, Timeout, SslOption) ->
  	M = fetch_comm_module(SslOption),
  
negative.code: open_socket(Host, Port, Options) ->
  	case fetch_comm_module(Options) of
  		ssl ->
  			%% Start ssl application
  			application:start(ssl),
  			%% Always seed
  			ssl:seed("wheredoyouthinkitcanbefound"),
  			%% new ssl implementation does not seem to work as of R13B01
  			%%{ok, SslSocket} = ssl:connect(Host, Port, [{ssl_imp, new}, {active, false}, {verify, verify_none}]),
  			ssl:connect(Host, Port, [{verify, 0}, {active, false}]);
  		_ ->
  			gen_tcp:connect(Host, Port, [{active, false}])
  	end.
  
  