Re: Messages over Sys.max_string_length in size

Gerd Stolpmann <[email protected]> Sat, 02 Jul 2005 19:38:36 +0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
Am Samstag, den 02.07.2005, 18:07 +0100 schrieb Richard Jones:
> Does netclient support a way to process messages which exceed
> Sys.max_string_length bytes in size?  We are downloading some rather
> large objects from a remote server, and they are approaching 16 MB in
> size.  msg#get_resp_body () returns a string, so there is a danger
> that the string could get too long, and I can't see another way to get
> the message.  We are particularly interested in passing the response
> directly to PXP, which will take input from, for instance, a Buffer.t,
> if that's available.

This afternoon I specified an improved interface for netclient that
would allow such downloads:

https://gps.dynxs.de/svn/lib-netclient/trunk/new_http_client.mli

This new API uses Netmime classes to represent headers and bodies. In
particular, the bodies can be backed by files (or by whatever storage).

PXP can read directly from Netmime's bodies (using the function
from_obj_channel).

Since this is not only an API change, it will take some days to
implement this (I hope < 2 days; I have some time now, so this will be
done soon). There are still some open questions, especially concerning
future extensions (e.g. SSL).

Any comments on this plan are welcome. I also attach a conversation with
Stefano Zacchiroli that explains this quite old plan.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
[email protected]          http://www.gerd-stolpmann.de
------------------------------------------------------------
(unnamed) (message/rfc822, 3.9 KB) - not displayed
(unnamed) (message/rfc822, 5.5 KB) - not displayed
(unnamed) (message/rfc822, 3 KB) - not displayed
(unnamed) (message/rfc822, 4 KB) - not displayed
(unnamed) (message/rfc822, 3.3 KB) - not displayed