aboutsummaryrefslogtreecommitdiffstats
path: root/net/erlang-xmlrpc/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/erlang-xmlrpc/files')
-rw-r--r--net/erlang-xmlrpc/files/patch-src_xmlrpc.erl18
-rw-r--r--net/erlang-xmlrpc/files/patch-src_xmlrpc__decode.erl11
-rw-r--r--net/erlang-xmlrpc/files/patch-src_xmlrpc__http.erl26
3 files changed, 55 insertions, 0 deletions
diff --git a/net/erlang-xmlrpc/files/patch-src_xmlrpc.erl b/net/erlang-xmlrpc/files/patch-src_xmlrpc.erl
new file mode 100644
index 00000000000..6e2ee005302
--- /dev/null
+++ b/net/erlang-xmlrpc/files/patch-src_xmlrpc.erl
@@ -0,0 +1,18 @@
+--- src/xmlrpc.erl.orig 2003-04-23 19:06:45 UTC
++++ src/xmlrpc.erl
+@@ -164,7 +164,14 @@ handle_payload(Socket, KeepAlive, Timeou
+
+ get_payload(Socket, Timeout, ContentLength) ->
+ inet:setopts(Socket, [{packet, raw}]),
+- gen_tcp:recv(Socket, ContentLength, Timeout).
++ get_payload(Socket, Timeout, ContentLength, []).
++
++get_payload(Socket, Timeout, 0, Payload) ->
++ {ok, lists:concat(lists:reverse(Payload))};
++
++get_payload(Socket, Timeout, ContentLength, Payload) ->
++ {ok, Bin} = gen_tcp:recv(Socket, 0, Timeout),
++ get_payload(Socket, Timeout, ContentLength - length(Bin), [Bin|Payload]).
+
+ %% Exported: start_link/{1,5,6}
+
diff --git a/net/erlang-xmlrpc/files/patch-src_xmlrpc__decode.erl b/net/erlang-xmlrpc/files/patch-src_xmlrpc__decode.erl
new file mode 100644
index 00000000000..6186d57c8f2
--- /dev/null
+++ b/net/erlang-xmlrpc/files/patch-src_xmlrpc__decode.erl
@@ -0,0 +1,11 @@
+--- src/xmlrpc_decode.erl.orig 2003-04-23 19:06:45 UTC
++++ src/xmlrpc_decode.erl
+@@ -28,7 +28,7 @@
+ -author('jocke@gleipnir.com').
+ -export([payload/1]).
+
+--include("xmerl.hrl").
++-include_lib("xmerl/include/xmerl.hrl").
+
+ payload(Payload) ->
+ case xmerl_scan:string(Payload) of
diff --git a/net/erlang-xmlrpc/files/patch-src_xmlrpc__http.erl b/net/erlang-xmlrpc/files/patch-src_xmlrpc__http.erl
new file mode 100644
index 00000000000..417a03305e6
--- /dev/null
+++ b/net/erlang-xmlrpc/files/patch-src_xmlrpc__http.erl
@@ -0,0 +1,26 @@
+--- src/xmlrpc_http.erl.orig 2003-04-23 19:06:45 UTC
++++ src/xmlrpc_http.erl
+@@ -142,7 +142,14 @@ handle_payload(Socket, Timeout, Handler,
+
+ get_payload(Socket, Timeout, ContentLength) ->
+ inet:setopts(Socket, [{packet, raw}]),
+- gen_tcp:recv(Socket, ContentLength, Timeout).
++ get_payload(Socket, Timeout, ContentLength, []).
++
++get_payload(Socket, Timeout, 0, Payload) ->
++ {ok, lists:concat(lists:reverse(Payload))};
++
++get_payload(Socket, Timeout, ContentLength, Payload) ->
++ {ok, Bin} = gen_tcp:recv(Socket, 0, Timeout),
++ get_payload(Socket, Timeout, ContentLength - length(Bin), [Bin|Payload]).
+
+ eval_payload(Socket, Timeout, {M, F} = Handler, State, Connection, Payload) ->
+ case catch M:F(State, Payload) of
+@@ -190,6 +197,7 @@ send(Socket, StatusCode, ExtraHeader, Pa
+ Response =
+ ["HTTP/1.1 ", integer_to_list(StatusCode), " ",
+ reason_phrase(StatusCode), "\r\n",
++ "Content-Type: text/xml\r\n",
+ "Content-Length: ", integer_to_list(lists:flatlength(Payload)),
+ "\r\n",
+ "Server: Erlang/1.13\r\n",