diff -ruN 1.13/src/Makefile 1.13-wy/src/Makefile
--- 1.13/src/Makefile	2003-04-23 13:06:45.000000000 -0600
+++ 1.13-wy/src/Makefile	2009-07-26 17:13:01.000000000 -0600
@@ -1,6 +1,3 @@
-# Update the XMERL_PATH to point at your xmerl installation.
-XMERL_PATH=../../xmerl
-
 # Do not change anything below this line.
 ifeq ($(DEBUG),true)
 DEBUG_FLAGS = -DDEBUG
@@ -9,7 +6,7 @@
 endif
 
 ERLC=erlc
-ERLC_FLAGS=-W $(DEBUG_FLAGS) -I $(XMERL_PATH)/inc -o ../ebin
+ERLC_FLAGS=-W $(DEBUG_FLAGS) -o ../ebin
 MODULES=xmlrpc xmlrpc_decode xmlrpc_encode xmlrpc_http xmlrpc_util tcp_serv
 EBIN_FILES=$(MODULES:%=../ebin/%.beam)
 
diff -ruN 1.13/src/tcp_serv.erl 1.13-wy/src/tcp_serv.erl
--- 1.13/src/tcp_serv.erl	2003-04-23 13:06:45.000000000 -0600
+++ 1.13-wy/src/tcp_serv.erl	2009-07-26 17:31:20.000000000 -0600
@@ -139,7 +139,7 @@
 		    ?ERROR_LOG({M, F, Reason}),
 		    gen_tcp:close(Socket)
 	    end;
-	{error, Reason} ->
+	{error, _Reason} ->
 	    timer:sleep(5000),
 	    Parent ! start_session
     end.
@@ -151,6 +151,6 @@
 
 %% Exported: system_terminate/3
 
-system_terminate(Reason, Parent, DebugInfo, State) ->
+system_terminate(Reason, _Parent, _DebugInfo, State) ->
     cleanup(State),
     exit(Reason).
diff -ruN 1.13/src/xmlrpc.erl 1.13-wy/src/xmlrpc.erl
--- 1.13/src/xmlrpc.erl	2003-04-23 13:06:45.000000000 -0600
+++ 1.13-wy/src/xmlrpc.erl	2009-07-26 18:02:51.000000000 -0600
@@ -102,21 +102,21 @@
 parse_header(Socket, Timeout) -> parse_header(Socket, Timeout, #header{}).
 
 parse_header(Socket, Timeout, Header) ->
-    case gen_tcp:recv(Socket, 0, Timeout) of
+	case gen_tcp:recv(Socket, 0, Timeout) of
 	{ok, "\r\n"} when Header#header.content_length == undefined ->
 	    {error, missing_content_length};
 	{ok, "\r\n"} -> {ok, Header};
 	{ok, HeaderField} ->
-	    case string:tokens(HeaderField, " \r\n") of
-		["Content-Length:", ContentLength] ->
-		    case catch list_to_integer(ContentLength) of
-			Value ->
+	    case string:tokens(string:to_lower(HeaderField), " \r\n") of
+		["content-length:", ContentLength] ->
+			try
+				Value = list_to_integer(ContentLength),
 			    parse_header(Socket, Timeout,
-					 Header#header{content_length =
-						       Value});
-			_ -> {error, {invalid_content_length, ContentLength}}
+					 Header#header{content_length = Value})
+		    catch
+				_ -> {error, {invalid_content_length, ContentLength}}
 		    end;
-		["Connection:", "close"] ->
+		["connection:", "close"] ->
 		    parse_header(Socket, Timeout,
 				 Header#header{connection = close});
 		_ ->
@@ -179,7 +179,7 @@
     tcp_serv:start_link([Port, MaxSessions, OptionList, SessionHandler]).
 
 ip(all) -> [];
-ip(IP) when tuple(IP) -> {ip, IP}.
+ip(IP) when is_tuple(IP) -> {ip, IP}.
 
 %% Exported: stop/1
 
diff -ruN 1.13/src/xmlrpc_decode.erl 1.13-wy/src/xmlrpc_decode.erl
--- 1.13/src/xmlrpc_decode.erl	2003-04-23 13:06:45.000000000 -0600
+++ 1.13-wy/src/xmlrpc_decode.erl	2009-07-26 18:03:29.000000000 -0600
@@ -28,11 +28,11 @@
 -author('jocke@gleipnir.com').
 -export([payload/1]).
 
--include("xmerl.hrl").
+-include_lib("xmerl/include/xmerl.hrl").
 
 payload(Payload) ->
     case xmerl_scan:string(Payload) of
-	{E, _}  ->
+	{E, _} when is_record(E, xmlElement) ->
 	    case catch decode_element(E) of
 		{'EXIT', Reason} -> exit(Reason);
 		Result -> Result
@@ -41,7 +41,7 @@
     end.
 
 decode_element(#xmlElement{name = methodCall} = MethodCall)
-  when record(MethodCall, xmlElement) ->
+  when is_record(MethodCall, xmlElement) ->
     {MethodName, Rest} =
 	match_element([methodName], MethodCall#xmlElement.content),
     TextValue = get_text_value(MethodName#xmlElement.content),
@@ -53,13 +53,13 @@
 	    {ok, {call, list_to_atom(TextValue), DecodedParams}}
     end;
 decode_element(#xmlElement{name = methodResponse} = MethodResponse)
-  when record(MethodResponse, xmlElement) ->
+  when is_record(MethodResponse, xmlElement) ->
     case match_element([fault, params], MethodResponse#xmlElement.content) of
 	{Fault, _} when Fault#xmlElement.name == fault ->
 	    {Value, _} = match_element([value], Fault#xmlElement.content),
 	    case decode(Value#xmlElement.content) of
 		{struct, [{faultCode, Code},
-			  {faultString, String}]} when integer(Code) ->
+			  {faultString, String}]} when is_integer(Code) ->
 		    case xmlrpc_util:is_string(String) of
 			yes -> {ok, {response, {fault, Code, String}}};
 			no -> {error, {bad_string, String}}
@@ -79,12 +79,12 @@
 
 match_element(Type, NameList, []) ->
     return(Type, {error, {missing_element, NameList}});
-match_element(Type, NameList, [E|Rest]) when record(E, xmlElement) ->
+match_element(Type, NameList, [E|Rest]) when is_record(E, xmlElement) ->
     case lists:member(E#xmlElement.name, NameList) of
 	true -> {E, Rest};
 	false -> return(Type, {error, {unexpected_element, E#xmlElement.name}})
     end;
-match_element(Type, NameList, [T|Rest]) when record(T, xmlText) ->
+match_element(Type, NameList, [T|Rest]) when is_record(T, xmlText) ->
     case only_whitespace(T#xmlText.value) of
 	yes -> match_element(Type, NameList, Rest);
 	no ->
@@ -101,7 +101,7 @@
 only_whitespace(_) -> no.
 
 get_text_value([]) -> [];
-get_text_value([T|Rest]) when record(T, xmlText) ->
+get_text_value([T|Rest]) when is_record(T, xmlText) ->
     T#xmlText.value++get_text_value(Rest);
 get_text_value(_) -> throw({error, missing_text}).
 
@@ -114,12 +114,12 @@
 	    [decode(Value#xmlElement.content)|decode_params(Rest)]
     end.
 
-decode(Content) when list(Content) ->
+decode(Content) when is_list(Content) ->
     case get_value(Content) of
 	{text_value, TextValue} -> TextValue;
 	E -> decode(E)
     end;
-decode(String) when record(String, xmlText) -> String#xmlText.value;
+decode(String) when is_record(String, xmlText) -> String#xmlText.value;
 decode(Struct) when Struct#xmlElement.name == struct ->
     {struct, decode_members(Struct#xmlElement.content)};
 decode(Array) when Array#xmlElement.name == array ->
@@ -154,12 +154,12 @@
     end.
 
 any_element([]) -> false;
-any_element([E|_]) when record(E, xmlElement) -> true;
+any_element([E|_]) when is_record(E, xmlElement) -> true;
 any_element([_|Rest]) -> any_element(Rest).
 
 get_element([]) -> throw({error, missing_element});
-get_element([E|_]) when record(E, xmlElement) -> E;
-get_element([T|Rest]) when record(T, xmlText) ->
+get_element([E|_]) when is_record(E, xmlElement) -> E;
+get_element([T|Rest]) when is_record(T, xmlText) ->
     case only_whitespace(T#xmlText.value) of
 	yes -> get_element(Rest);
 	no -> throw({error, {unexpected_text, T#xmlText.value}})
@@ -186,7 +186,7 @@
 
 make_integer(Integer) ->
     case catch list_to_integer(Integer) of
-	{'EXIT', Reason} -> throw({error, {not_integer, Integer}});
+	{'EXIT', _Reason} -> throw({error, {not_integer, Integer}});
 	Value -> Value
     end.
 
diff -ruN 1.13/src/xmlrpc_encode.erl 1.13-wy/src/xmlrpc_encode.erl
--- 1.13/src/xmlrpc_encode.erl	2003-04-23 13:06:45.000000000 -0600
+++ 1.13-wy/src/xmlrpc_encode.erl	2009-07-26 18:03:58.000000000 -0600
@@ -30,7 +30,7 @@
 
 %% Exported: payload/1
 
-payload({call, Name, Params}) when atom(Name), list(Params) ->
+payload({call, Name, Params}) when is_atom(Name), is_list(Params) ->
     case encode_params(Params) of
 	{error, Reason} -> {error, Reason};
 	EncodedParams ->
@@ -40,7 +40,7 @@
 		 "</methodCall>"],
 	    {ok, EncodedPayload}
     end;
-payload({response, {fault, Code, String}}) when integer(Code) ->
+payload({response, {fault, Code, String}}) when is_integer(Code) ->
     case xmlrpc_util:is_string(String) of
 	yes ->
 	    EncodedPayload =
@@ -81,16 +81,16 @@
 	{error, Reason} -> {error, Reason};
 	Members -> ["<struct>", Members, "</struct>"]
     end;
-encode({array, Array}) when list(Array) ->
+encode({array, Array}) when is_list(Array) ->
     case encode_values(Array)of
 	{error, Reason} -> {error, Reason};
 	Values -> ["<array><data>", Values, "</data></array>"]
     end;
-encode(Integer) when integer(Integer) ->
+encode(Integer) when is_integer(Integer) ->
     ["<int>", integer_to_list(Integer), "</int>"];
 encode(true) -> "<boolean>1</boolean>"; % duh!
 encode(false) -> "<boolean>0</boolean>"; % duh!
-encode(Double) when float(Double) ->
+encode(Double) when is_float(Double) ->
     ["<double>", io_lib:format("~p", [Double]), "</double>"];
 encode({date, Date}) ->
     case xmlrpc_util:is_iso8601_date(Date) of
@@ -117,7 +117,7 @@
 encode_members(Struct) -> encode_members(Struct, []).
 
 encode_members([], Acc) -> Acc;
-encode_members([{Name, Value}|Rest], Acc) when atom(Name) ->
+encode_members([{Name, Value}|Rest], Acc) when is_atom(Name) ->
     case encode(Value) of
 	{error, Reason} -> {error, Reason};
 	EncodedValue ->
@@ -126,8 +126,8 @@
 		      EncodedValue, "</value></member>"],
 	    encode_members(Rest, NewAcc)
     end;
-encode_members([{Name, Value}|Rest], Acc) -> {error, {invalid_name, Name}};
-encode_members(UnknownMember, Acc) ->
+encode_members([{Name, _Value}|_Rest], _Acc) -> {error, {invalid_name, Name}};
+encode_members(UnknownMember, _Acc) ->
     {error, {unknown_member, UnknownMember}}.
 
 encode_values(Array) -> encode_values(Array, []).
@@ -140,6 +140,5 @@
 	    NewAcc = Acc++["<value>", EncodedValue, "</value>"],
 	    encode_values(Rest, NewAcc)
     end;
-encode_values([{Name, Value}|Rest], Acc) -> {error, {invalid_name, Name}};
-encode_values(UnknownMember, Acc) ->
+encode_values(UnknownMember, _Acc) ->
     {error, {unknown_member, UnknownMember}}.
diff -ruN 1.13/src/xmlrpc_http.erl 1.13-wy/src/xmlrpc_http.erl
--- 1.13/src/xmlrpc_http.erl	2003-04-23 13:06:45.000000000 -0600
+++ 1.13-wy/src/xmlrpc_http.erl	2009-07-26 17:30:50.000000000 -0600
@@ -65,8 +65,8 @@
 		["POST", _, "HTTP/1.1"] ->
 		    ?DEBUG_LOG({http_version, "1.1"}),
 		    parse_header(Socket, Timeout);
-		[Method, _, "HTTP/1.1"] -> {status, 501};
-		["POST", _, HTTPVersion] -> {status, 505};
+		[_UnknownMethod, _, "HTTP/1.1"] -> {status, 501};
+		["POST", _, _UnknownVersion] -> {status, 505};
 		_ -> {status, 400}
 	    end;
 	{error, Reason} -> {error, Reason}
@@ -84,26 +84,26 @@
 	    {status, 400};
 	{ok, "\r\n"} -> {ok, Header};
 	{ok, HeaderField} ->
-	    case split_header_field(HeaderField) of
-		{[$C,$o,$n,$t,$e,$n,$t,$-,_,$e,$n,$g,$t,$h,$:],
-		 ContentLength} ->
-		    case catch list_to_integer(ContentLength) of
-			N ->
+	    case string:to_lower(split_header_field(HeaderField)) of
+		{"content-length:", ContentLength} ->
+		    try
+				N = list_to_integer(ContentLength),
 			    parse_header(Socket, Timeout,
-					 Header#header{content_length = N});
-			_ -> {status, 400}
-			  end;
-		{"Content-Type:", "text/xml"} ->
+					 Header#header{content_length = N})
+			catch
+				_ -> {status, 400}
+			end;
+		{"content-type:", "text/xml"} ->
 		    parse_header(Socket, Timeout,
 				 Header#header{content_type = "text/xml"});
-		{"Content-Type:", ContentType} -> {status, 415};
-		{"User-Agent:", UserAgent} ->
+		{"content-type:", _UnknownContentType} -> {status, 415};
+		{"user-agent:", UserAgent} ->
 		    parse_header(Socket, Timeout,
 				 Header#header{user_agent = UserAgent});
-		{"Connection:", "close"} ->
+		{"connection:", "close"} ->
 		    parse_header(Socket, Timeout,
 				 Header#header{connection = close});
-		{"Connection:", [_,$e,$e,$p,$-,_,$l,$i,$v,$e]} ->
+		{"connection:", [_,$e,$e,$p,$-,_,$l,$i,$v,$e]} ->
 		    parse_header(Socket, Timeout,
 				 Header#header{connection = undefined});
 		_ ->
@@ -162,7 +162,7 @@
 	    handler(Socket, Timeout, Handler, State);
 	{false, ResponsePayload} ->
 	    encode_send(Socket, 200, "Connection: close\r\n", ResponsePayload);
-	{true, NewTimeout, NewState, ResponsePayload} when
+	{true, _NewTimeout, _NewState, ResponsePayload} when
 	      Connection == close ->
 	    encode_send(Socket, 200, "Connection: close\r\n", ResponsePayload);
 	{true, NewTimeout, NewState, ResponsePayload} ->
