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

If the FastCGI address starts with a '/', it's obviously a UNIX domain socket

We don't really need the "unix:" prefix now, but just leave that support in
for backward compatibility.
parent 93cc268f
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3734 passed
......@@ -3929,7 +3929,7 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
ulong val;
SOCKET sock;
if (strncmp(path, "unix:", 5) == 0) {
if (*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,10 @@ static SOCKET fastcgi_connect(const char *orig_path, SOCKET client_sock)
}
addr.sun_family = AF_UNIX;
SAFECOPY(addr.sun_path, path + 5);
if(*path == '/')
SAFECOPY(addr.sun_path, path);
else
SAFECOPY(addr.sun_path, path + 5);
#ifdef SUN_LEN
addr_len = SUN_LEN(&addr);
#else
......
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