caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Dave Benjamin <dave@ramenlabs.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Simple HTTPS client example?
Date: Tue, 04 Sep 2007 19:26:57 +0200	[thread overview]
Message-ID: <1188926817.8088.17.camel@localhost.localdomain> (raw)
In-Reply-To: <46DD8559.9080401@ramenlabs.com>

Am Dienstag, den 04.09.2007, 09:18 -0700 schrieb Dave Benjamin:
> Gerd Stolpmann wrote:
> > Am Montag, den 03.09.2007, 21:32 -0700 schrieb Dave Benjamin:
> >> Has anyone written any code to use Ocamlnet to retrieve a URL using 
> >> HTTPS? I'm looking at Uq_ssl and Http_client, but can't seem to find a 
> >> way to fit them together.
> > 
> > There is no easy way to do so.
> 
> Well, is there a difficult way to do so? Any idea what that way might be? =)

Yes. Change Http_client so it can make use of Uq_ssl. This is, however,
not so easy.

> Otherwise, it seems like it ought to be possible at least to use a proxy 
> like squid to relay the request. However, even with proxy enabled, I get 

A proxy doesn't work here, because encryption is end-to-end. What you
need is a tunnel endpoint like stunnel. I think that a few changes of
Http_client are still necessary since there is currently no way to
inject an already connected socket into it.

> this error:
> 
> 	Exception: Failure "Http_client: bad URL".
> 
> whenever there is an "https" as the protocol. It looks like subclassing 
> the call class and overriding set_request_uri to accept HTTPS URLs would 
> at least make that error go away, but then something additional would 
> need to be done to keep track of the protocol when it's time to send it 
> to the proxy...

I guess this is the simplest part of the change.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------


      reply	other threads:[~2007-09-04 17:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04  4:32 Dave Benjamin
2007-09-04 12:07 ` [Caml-list] " Gerd Stolpmann
2007-09-04 16:18   ` Dave Benjamin
2007-09-04 17:26     ` Gerd Stolpmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1188926817.8088.17.camel@localhost.localdomain \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=dave@ramenlabs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).