Bug #1672
mod_cgi dies when lighttpd is used behind a unix domain socket
| Status: | Fixed | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | mod_cgi | |||
| Target version: | 1.5.0 | |||
| Pending: | No |
Resolution: | fixed |
|
Description
When lighttpd operates behind a unix socket mod_cgi does not work because the parsing of some CGI variable (SERVER_ADDR and REMOTE_ADDR) fails without warning (indeed leading to a segmentation fault of the forked process before execve).
This type of partial testing {{{ srv_sock->addr.plain.sa_family == AF_INET6 ? srv_sock->addr.ipv6.sin6_port : srv_sock->addr.ipv4.sin_port }}} overlook completely the existence of unix domain sockets and leads to the failure of inet_ntop.
At the very least this fact should be documented and a good error message should be logged. But it should be better to be able to use mod_cgi behind a unix domain socket.