Bug #1672

mod_cgi dies when lighttpd is used behind a unix domain socket

Added by lunatic 231 days ago. Updated 162 days ago.

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.

not_a_real_patch.diff - basic logging (1.4 KB) lunatic, 05/21/2008 04:24 PM

works_for_me.diff (2.3 KB) lunatic, 05/21/2008 07:59 PM

History

05/21/2008 07:59 PM - lunatic

This bug seems to be the same as #653.

05/21/2008 08:01 PM - lunatic

I join a patch (unsuitable for main repo) which works for me.

07/28/2008 09:12 PM - stbuehler

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r2238

Also available in: Atom PDF