Skip to content
Browse files

applied patch by happi at Kreditor, originally dated 2006-02-22

  • Loading branch information...
1 parent db6943c commit eaaa5d53b1ee453be841fe5980c422d79456f81f richcarl committed Oct 24, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/xmlrpc/src/xmlrpc_encode.erl
View
8 lib/xmlrpc/src/xmlrpc_encode.erl
@@ -35,7 +35,7 @@ payload({call, Name, Params}) when atom(Name), list(Params) ->
{error, Reason} -> {error, Reason};
EncodedParams ->
EncodedPayload =
- ["<?xml version=\"1.0\" encoding=\"iso_8859-1\"?><methodCall><methodName>",
+ ["<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><methodCall><methodName>",
atom_to_list(Name), "</methodName>", EncodedParams,
"</methodCall>"],
{ok, EncodedPayload}
@@ -44,7 +44,7 @@ payload({response, {fault, Code, String}}) when integer(Code) ->
case xmlrpc_util:is_string(String) of
yes ->
EncodedPayload =
- ["<?xml version=\"1.0\" encoding=\"iso_8859-1\"?><methodResponse><fault>"
+ ["<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><methodResponse><fault>"
"<value><struct><member><name>faultCode</name><value><int>",
integer_to_list(Code), "</int></value></member><member><name>"
"faultString</name><value><string>", escape_string(String),
@@ -59,7 +59,7 @@ payload({response, [Param]}) ->
case encode_params([Param]) of
{error, Reason} -> {error, Reason};
EncodedParam ->
- {ok, ["<?xml version=\"1.0\"?><methodResponse>", EncodedParam,
+ {ok, ["<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><methodResponse>", EncodedParam,
"</methodResponse>"]}
end;
payload(Payload) -> {error, {bad_payload, Payload}}.
@@ -98,7 +98,7 @@ encode({base64, Base64}) ->
["<base64>", Base64, "</base64>"];
encode(Value) ->
case xmlrpc_util:is_string(Value) of
- yes -> escape_string(Value);
+ yes -> ["<string>", escape_string(Value), "</string>"];
no -> {error, {bad_value, Value}}
end.

0 comments on commit eaaa5d5

Please sign in to comment.
Something went wrong with that request. Please try again.