Skip to content

Commit

Permalink
applied patch by happi at Kreditor, originally dated 2006-02-22
Browse files Browse the repository at this point in the history
  • Loading branch information
richcarl committed Oct 24, 2008
1 parent db6943c commit eaaa5d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/xmlrpc/src/xmlrpc_encode.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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),
Expand All @@ -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}}.
Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit eaaa5d5

Please sign in to comment.