cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP connection to unix socket

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 14 Apr 2008 11:11:17 +0200 (CEST)

On Mon, 14 Apr 2008, Nikolai Kondrashov wrote:

> Why do you insist on abusing HTTP URL scheme? Why not introduce another one?
> We could take file URL scheme:
>
> file://<host>/<path>
>
> And extend it:
>
> unix://<host>/<socket path>?<URL-encoded tunnelled URL>

Well, I think it is because we're talking about HTTP over domain socket, so we
still need to say that it is HTTP.

unix:// would more look like a generic socket somehow

If we introduce a new scheme it would rather have to specify HTTP and thus be
more like:

   uhttp://<socket path>?<URL-encoded tunnelled URL>

But I can also just see how we add a new CURLOPT_UNIXDOMAIN that sets a path
that will be used instead of creating an outbound connection as then all of a
sudden we can support more or less all protocols over that at once. The
exception would probably be FTP as that uses two connections and I doubt
anyone uses unix domain sockets for such servers.

A new option seems like the least kludgey way to me.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-04-14