Project

General

Profile

lighttpd-remote-addr.diff

davidm, 2017-10-07 16:07

View differences:

http-header-glue.c 2017-10-07 09:46:21.110977879 -0600
976 976
        rc |= cb(vdata, CONST_STR_LEN("SERVER_NAME"), s, strlen(s));
977 977
    }
978 978

  
979
    rc |= cb(vdata, CONST_STR_LEN("REMOTE_ADDR"),
980
                    CONST_BUF_LEN(con->dst_addr_buf));
979
    if (con->dst_addr.plain.sa_family == AF_UNIX)
980
      rc |= cb(vdata, CONST_STR_LEN("REMOTE_ADDR"), "", 0);
981
    else
982
      rc |= cb(vdata, CONST_STR_LEN("REMOTE_ADDR"),
983
	       CONST_BUF_LEN(con->dst_addr_buf));
981 984

  
982 985
  #ifdef HAVE_IPV6
983 986
    port = con->dst_addr.plain.sa_family == AF_INET6