1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-10 11:35:07 -05:00
curl/packages
Peter Wu 970c22f970 libcurl: add UNIX domain sockets support
The ability to do HTTP requests over a UNIX domain socket has been
requested before, in Apr 2008 [0][1] and Sep 2010 [2]. While a
discussion happened, no patch seems to get through. I decided to give it
a go since I need to test a nginx HTTP server which listens on a UNIX
domain socket.

One patch [3] seems to make it possible to use the
CURLOPT_OPENSOCKETFUNCTION function to gain a UNIX domain socket.
Another person wrote a Go program which can do HTTP over a UNIX socket
for Docker[4] which uses a special URL scheme (though the name contains
cURL, it has no relation to the cURL library).

This patch considers support for UNIX domain sockets at the same level
as HTTP proxies / IPv6, it acts as an intermediate socket provider and
not as a separate protocol. Since this feature affects network
operations, a new feature flag was added ("unix-sockets") with a
corresponding CURL_VERSION_UNIX_SOCKETS macro.

A new CURLOPT_UNIX_SOCKET_PATH option is added and documented. This
option enables UNIX domain sockets support for all requests on the
handle (replacing IP sockets and skipping proxies).

A new configure option (--enable-unix-sockets) and CMake option
(ENABLE_UNIX_SOCKETS) can disable this optional feature. Note that I
deliberately did not mark this feature as advanced, this is a
feature/component that should easily be available.

 [0]: http://curl.haxx.se/mail/lib-2008-04/0279.html
 [1]: http://daniel.haxx.se/blog/2008/04/14/http-over-unix-domain-sockets/
 [2]: http://sourceforge.net/p/curl/feature-requests/53/
 [3]: http://curl.haxx.se/mail/lib-2008-04/0361.html
 [4]: https://github.com/Soulou/curl-unix-socket

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04 02:52:19 +01:00
..
AIX add newly created manual page 2012-04-27 20:25:35 +02:00
Android build: Renamed CURLX_ONES file list definition to CURLX_CFILES 2014-05-21 23:11:51 +01:00
DOS packages/DOS/common.dj: remove COFF debug info generation 2013-01-10 19:58:59 +01:00
EPM add newly created manual page 2012-04-27 20:25:35 +02:00
Linux add newly created manual page 2012-04-27 20:25:35 +02:00
NetWare Removed trailing empty strings from awk script. 2012-07-12 00:07:01 +02:00
OS400 libcurl: add UNIX domain sockets support 2014-12-04 02:52:19 +01:00
Solaris remove all .cvsignore files 2010-03-25 23:22:03 +01:00
Symbian sasl_gssapi: Introduced GSS-API based SASL module 2014-12-02 21:57:45 +00:00
TPF Changed the TPF make file to get source files from Makefile.inc 2010-09-27 17:47:20 -07:00
vms docs: Use consistent naming for Kerberos 2014-11-15 13:10:45 +00:00
Win32 remove all .cvsignore files 2010-03-25 23:22:03 +01:00
Makefile.am build: move Android.mk to packages/Android/ 2013-02-06 23:08:05 +01:00
README removed trailing whitespace 2010-02-14 19:40:18 +00:00

                                  _   _ ____  _
                              ___| | | |  _ \| |
                             / __| | | | |_) | |
                            | (__| |_| |  _ <| |___
                             \___|\___/|_| \_\_____|

PACKAGES

 This directory and all its subdirectories are for special package
information, template, scripts and docs. The files herein should be of use for
those of you who want to package curl in a binary or source format using one
of those custom formats.

 The hierarchy for these directories is something like this:

   packages/[OS]/[FORMAT]/

 Currently, we have Win32 and Linux for [OS]. There might be different formats
for the same OS so for Linux we have RPM as format.

 We might need to add some differentiation for CPU as well, as there is
Linux-RPMs for several CPUs. However, it might not be necessary since the
packaging should be pretty much the same no matter what CPU that is used.

 For each unique OS-FORMAT pair, there's a directory to "fill"! I'd like to
see a single README with as much details as possible, and then I'd like some
template files for the package process.