summaryrefslogtreecommitdiff
path: root/src/network.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-10-03 21:13:09 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-10-03 21:16:03 -0400
commitc49f5150961542300069258bd48aa2004dc2213c (patch)
tree7fbb76b7779d5700d9c825031caefc1838f600b8 /src/network.c
parent513887fa529c681958c57a946dade81f3c11d616 (diff)
downloadlighttpd1.4-c49f5150961542300069258bd48aa2004dc2213c.tar.gz
lighttpd1.4-c49f5150961542300069258bd48aa2004dc2213c.zip
[network] do not append port to unix socket paths
x-ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=877039
Diffstat (limited to 'src/network.c')
-rw-r--r--src/network.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index 5c168376..ed42a2be 100644
--- a/src/network.c
+++ b/src/network.c
@@ -405,8 +405,10 @@ int network_init(server *srv) {
b = buffer_init();
buffer_copy_buffer(b, srv->srvconf.bindhost);
- buffer_append_string_len(b, CONST_STR_LEN(":"));
- buffer_append_int(b, srv->srvconf.port);
+ if (b->ptr[0] != '/') { /*(skip adding port if unix socket path)*/
+ buffer_append_string_len(b, CONST_STR_LEN(":"));
+ buffer_append_int(b, srv->srvconf.port);
+ }
/* check if we already know this socket, and if yes, don't init it */
for (j = 0; j < srv->srv_sockets.used; j++) {