Re: How to handle errors from Https_client?

Gerd Stolpmann <[email protected]> Sun, 08 Sep 2013 00:26:22 +0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <1378592782.10274.97.camel@zotac>
--===============1130143468429567375==
Content-Type: multipart/signed; micalg="pgp-sha1";
	protocol="application/pgp-signature"; 
	boundary="=-zcrX5q2X0cq6VwyVfDzb"


--=-zcrX5q2X0cq6VwyVfDzb
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

this is a bug in the error path. The fix was quite simple. Find it in
svn for the time being (revs 1906 and 1907):

https://godirepo.camlcity.org/svn/lib-ocamlnet2/trunk/code/

I don't see a workaround outside ocamlnet.

Gerd

Am Dienstag, den 03.09.2013, 10:37 +0300 schrieb T=C3=B6r=C3=B6k Edwin:
> Hi,
>=20
> Using Https_client with OCamlnet 3.6.3 and 3.7.3 some exceptions seem to =
escape the pipeline.
> For example if I take examples/netclient/simple/http_download.ml, and ini=
tialize Https_client according to the docs and trigger an https error on pu=
rpose (try to use HTTPS on an HTTP port):
> Fatal error: exception Invalid_argument("remove_resource: the group is te=
rminated")
>=20
> Also if I take examples/netclient/simple/http_mt.ml and initialize Https_=
client as the docs suggest I get
> this on an https error:
> Thread 1 killed on uncaught exception Invalid_argument("remove_resource: =
the group is terminated")
>=20
> With Http_client and pipeline#add_with_callback everything is fine: I get=
 my callback invoked,
> and I can check http_call#status for the actual error, and the pipeline k=
eeps working.
>=20
> With Https_client and the Convenience module I get the exception but sinc=
e it creates a new pipeline each time I can just wrap it and catch the exce=
ption there, and keep using it after the first error.
> With the pipeline it looks like after the first https error the pipeline =
becomes unusable.
>=20
> What am I doing wrong?
>=20
> I have attached a testcase, let me know if you need more info.
>=20
> Best regards,
> --Edwin
>=20
>=20
> -------------------------------------------------------------------------=
-----
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologi=
es
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=3D58040911&iu=3D/4140/ostg.=
clktrk
> _______________________________________________ Ocamlnet-devel mailing li=
st [email protected] https://lists.sourceforge.net/lists=
/listinfo/ocamlnet-devel

--=20
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    [email protected]
My OCaml site:          http://www.camlcity.org
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------

--=-zcrX5q2X0cq6VwyVfDzb
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEbBAABAgAGBQJSK6gOAAoJEAaM4b9ZLB5TVckH+OOgD+XsFKSboC2CzHXU2r9I
Jv5h2gI7XqnZz6OLrwGmWrnBCXUJws/IMq7Tjbg9XjX9uJcI0MJGf4C6F5AjaluP
ZfyCny/IvQQ5J/ZXjWxemyaufdvI8HW0CNzSDoHJoLfbdLFTYsqWO4qDlhxnWONr
JyO9Zej5UreObBURlrXLS93jGPbmUvsZ2WuumErCoSWYGjllr/hEhihKrSwB2VpX
9a5rLPjHtz67g9Yrac8DyeZeNX+xhCfVPLuEN0wEtbsWgTnl5EZ4dd2ymNWagCBN
/iMlqxWIgI4O1A5qeg3hQ9awcJLOlvgxiihPqOOir3WdeZs0bkmNCD7i60F2nQ==
=U144
-----END PGP SIGNATURE-----

--=-zcrX5q2X0cq6VwyVfDzb--



--===============1130143468429567375==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
--===============1130143468429567375==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel

--===============1130143468429567375==--