cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH 00/11] UNIX domain sockets support

From: Peter Wu <peter_at_lekensteyn.nl>
Date: Thu, 27 Nov 2014 23:59:15 +0100

Hi,

This patch series introduces support for performing requests over UNIX
domain sockets. The main use case is debugging nginx servers that listen
on said sockets. For that goal, two tests have been added.

Patch overview:

Unrelated fixes, but touch the same area in future patches (can be
applied independent of these patches):
  [01/11] runtests.pl: fix warning message, remove duplicate value
  [02/11] runtests.pl: fix startup of IPv6 servers

Prepare libcurl for adding support (required by 10/11):
  [03/11] lib/connect: restrict IP/TCP options to said sockets

Prepare test server for UNIX domain socket support (configure/cmake
knobs are not enabled here, but in 10/11):
  [04/11] sws: move away from IPv4/IPv4-only assumption
  [05/11] sws: restrict TCP_NODELAY to IP sockets
  [06/11] sws: add UNIX domain socket support
  [07/11] sws: try to remove socket and retry bind

Extend test suite with unix-sockets tests:
  [08/11] tests: add HTTP UNIX socket server testing support
  [09/11] tests: add two HTTP over UNIX socket tests

Actually add support for UNIX sockets to libcurl, add documentation and
configure options:
  [10/11] libcurl: add UNIX domain sockets support
  [11/11] tool: add --unix-socket option

Tested with both cmake and autotools on Arch Linux x86_64.

diffstat:

 CMakeLists.txt | 8 +
 configure.ac | 38 ++++
 docs/libcurl/curl_easy_setopt.3 | 2 +
 docs/libcurl/curl_version_info.3 | 3 +
 docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 | 76 ++++++++
 docs/libcurl/symbols-in-versions | 2 +
 include/curl/curl.h | 4 +
 lib/connect.c | 26 +--
 lib/curl_addrinfo.c | 39 ++++
 lib/curl_addrinfo.h | 4 +
 lib/curl_config.h.cmake | 3 +
 lib/url.c | 44 +++++
 lib/urldata.h | 4 +-
 lib/version.c | 3 +
 packages/OS400/curl.inc.in | 4 +
 src/tool_cfgable.c | 1 +
 src/tool_cfgable.h | 1 +
 src/tool_getparam.c | 8 +
 src/tool_help.c | 4 +-
 src/tool_operate.c | 4 +
 tests/FILEFORMAT | 3 +
 tests/README | 3 +
 tests/data/Makefile.inc | 3 +-
 tests/data/test1435 | 46 +++++
 tests/data/test1436 | 85 +++++++++
 tests/httpserver.pl | 15 +-
 tests/runtests.pl | 115 +++++++++---
 tests/server/server_sockaddr.h | 9 +-
 tests/server/sws.c | 256 +++++++++++++++++++--------
 tests/serverhelp.pm | 4 +-
 30 files changed, 699 insertions(+), 118 deletions(-)
 create mode 100644 docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
 create mode 100644 tests/data/test1435
 create mode 100644 tests/data/test1436

Kind regards,
Peter

-- 
2.1.3
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-28