mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 17:29:23 -04:00
Update to version 1.13. Make it support large requests/replies, and
deliver the proper Content-type required by some clients (like the ruby xmlrpc implementation).
This commit is contained in:
parent
1026ab92c2
commit
28f15eab13
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=81882
5 changed files with 53 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= erlang_xmlrpc
|
||||
PORTVERSION= 1.12
|
||||
PORTVERSION= 1.13
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://www.gleipnir.com/xmlrpc/
|
||||
DISTNAME= xmlrpc-${PORTVERSION}
|
||||
|
@ -29,7 +29,7 @@ XMLRPC_DOCS= xmlrpc.pdf xmlrpc.ps xmlrpc.txt
|
|||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|XMERL_PATH=.*|XMERL_PATH=${LOCALBASE}/lib/erlang/lib/xmerl|g' ${WRKSRC}/src/Makefile
|
||||
@${RM} ${WRKSRC}/src/Makefile.bak
|
||||
@${RM} ${WRKSRC}/src/Makefile.bak ${WRKSRC}/src/*.orig
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC}/src && ${GMAKE}
|
||||
|
|
|
@ -1 +1 @@
|
|||
MD5 (erlang/xmlrpc-1.12.tgz) = 74d124f255a7ab10d559ed6d40761e25
|
||||
MD5 (erlang/xmlrpc-1.13.tgz) = f042297a05282bd21068043d6dc77305
|
||||
|
|
20
net/erlang_xmlrpc/files/patch-src_xmlrpc.erl
Normal file
20
net/erlang_xmlrpc/files/patch-src_xmlrpc.erl
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/xmlrpc.erl.orig Fri May 23 10:47:55 2003
|
||||
+++ src/xmlrpc.erl Fri May 23 10:47:57 2003
|
||||
@@ -164,7 +164,14 @@
|
||||
|
||||
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}
|
29
net/erlang_xmlrpc/files/patch-src_xmlrpc__http.erl
Normal file
29
net/erlang_xmlrpc/files/patch-src_xmlrpc__http.erl
Normal file
|
@ -0,0 +1,29 @@
|
|||
|
||||
$FreeBSD$
|
||||
|
||||
--- src/xmlrpc_http.erl.orig Wed Apr 23 21:06:45 2003
|
||||
+++ src/xmlrpc_http.erl Fri May 23 11:59:38 2003
|
||||
@@ -142,7 +142,14 @@
|
||||
|
||||
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 @@
|
||||
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",
|
|
@ -5,6 +5,7 @@ lib/erlang/lib/xmlrpc/ebin/xmlrpc_encode.beam
|
|||
lib/erlang/lib/xmlrpc/ebin/xmlrpc_http.beam
|
||||
lib/erlang/lib/xmlrpc/ebin/xmlrpc_util.beam
|
||||
lib/erlang/lib/xmlrpc/src/Makefile
|
||||
lib/erlang/lib/xmlrpc/src/example_serv.erl
|
||||
lib/erlang/lib/xmlrpc/src/log.hrl
|
||||
lib/erlang/lib/xmlrpc/src/tcp_serv.erl
|
||||
lib/erlang/lib/xmlrpc/src/xmlrpc.erl
|
||||
|
|
Loading…
Add table
Reference in a new issue