[drakma-devel] HTTPS through proxy

Dave Lambert d.j.lambert at open.ac.uk
Mon May 19 16:14:25 UTC 2008


2008/5/19 Edi Weitz <edi at agharta.de>:
> On Mon, 19 May 2008 15:57:21 +0100, "Dave Lambert" <d.j.lambert at gmail.com> wrote:
>
>> I need to contact HTTPS servers through a proxy.  I've managed to
>> get this to work by having the http-request function issue an HTTP
>> CONNECT commmand in order to tunnel SSL through the proxy: the patch
>> is below (against 0.11.5).  On the downside, it only works for
>> Lispworks.

> Drakma's (limited) proxy functionality didn't work for you?

Drakma's HTTP proxy support is just great, but I also need to create an
HTTPS connection from behind a firewall.  This patch adds just that
HTTPS functionality.

There was a previous request for this on the mailing list:

http://common-lisp.net/pipermail/drakma-devel/2007-November/000212.html

> Is this based on some standard or does it cater to one specific
> server?

The approach is standard: Use the HTTP CONNECT method to get a tunnel
through the proxy, and then send SSL on the same connection.  It's
covered in HTTP 1.1:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.9

I've tested it on my local proxy, and a couple of HTTPS end points.

> Whatever email app you used ruined the patch.  Can you send it as an
> attachment or with another program?

That's a shame (it's Gmail).  Patch attached this time.

Cheers,
Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: https-proxy.diff
Type: text/x-patch
Size: 3084 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/drakma-devel/attachments/20080519/fd0857d1/attachment.bin>


More information about the Drakma-devel mailing list