Skip to content
This repository has been archived by the owner on May 22, 2018. It is now read-only.

Commit

Permalink
Merge commit '933fb9594d47b0d3e1deb27114d1eb6fb774fee4'
Browse files Browse the repository at this point in the history
  • Loading branch information
xen-git committed Jul 16, 2012
2 parents 3850d18 + 933fb95 commit 9d2c780
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions http-svr/xmlrpc_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ module Protocol = functor(F: FORMAT) -> struct
let read_response r s =
try
match r.Http.Response.content_length with
| Some l -> F.response_of_string (Unixext.really_read_string s (Int64.to_int l))
| None -> F.response_of_file_descr s
| Some l when (Int64.to_int l) <= Sys.max_string_length ->
F.response_of_string (Unixext.really_read_string s (Int64.to_int l))
| Some _ | None -> F.response_of_file_descr s
with
| Unix.Unix_error(Unix.ECONNRESET, _, _) -> raise Connection_reset

Expand All @@ -308,8 +309,6 @@ end
module XML_protocol = Protocol(XML)
module XMLRPC_protocol = Protocol(XMLRPC)

let read_xml_rpc_response = XML_protocol.read_response




0 comments on commit 9d2c780

Please sign in to comment.