Skip to content
Snippets Groups Projects
Commit 73a821b7 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 6049bc00
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3735 passed
......@@ -3929,7 +3929,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
ulong val;
SOCKET sock;
if (*path == '/' || strncmp(path, "unix:", 5) == 0) {
if (*path == '/'|| *path == '.' || strncmp(path, "unix:", 5) == 0) {
#if defined(_WIN32) && !defined(UDS_SUPPORT)
lprintf(LOG_ERR, "%04d UNIX DOMAIN SOCKETS ARE NOT SUPPORTED in %s", client_sock, __FUNCTION__);
return INVALID_SOCKET;
......@@ -3945,7 +3945,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
}
addr.sun_family = AF_UNIX;
if(*path == '/')
if(*path == '/' || *path == '.')
SAFECOPY(addr.sun_path, path);
else
SAFECOPY(addr.sun_path, path + 5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment