Skip to content
Snippets Groups Projects
Commit f62d7e0a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

If the FastCGI address begins with a '.', treat as UNIX Domain Socket as well

<Deuce> So the [previous] change doesn't work with relative paths?

So... support relative UDS paths in this manner (without the "unix:" prefix)
parent 97babb50
No related branches found
No related tags found
No related merge requests found
...@@ -3929,7 +3929,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock) ...@@ -3929,7 +3929,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
ulong val; ulong val;
SOCKET sock; SOCKET sock;
if (*path == '/' || strncmp(path, "unix:", 5) == 0) { if (*path == '/'|| *path == '.' || strncmp(path, "unix:", 5) == 0) {
#if defined(_WIN32) && !defined(UDS_SUPPORT) #if defined(_WIN32) && !defined(UDS_SUPPORT)
lprintf(LOG_ERR, "%04d UNIX DOMAIN SOCKETS ARE NOT SUPPORTED in %s", client_sock, __FUNCTION__); lprintf(LOG_ERR, "%04d UNIX DOMAIN SOCKETS ARE NOT SUPPORTED in %s", client_sock, __FUNCTION__);
return INVALID_SOCKET; return INVALID_SOCKET;
...@@ -3945,7 +3945,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock) ...@@ -3945,7 +3945,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
} }
addr.sun_family = AF_UNIX; addr.sun_family = AF_UNIX;
if(*path == '/') if(*path == '/' || *path == '.')
SAFECOPY(addr.sun_path, path); SAFECOPY(addr.sun_path, path);
else else
SAFECOPY(addr.sun_path, path + 5); SAFECOPY(addr.sun_path, path + 5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment