Project

General

Profile

Bug #1672

mod_cgi dies when lighttpd is used behind a unix domain socket

Added by lunatic over 11 years ago. Updated about 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_cgi
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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 (1.42 KB) not_a_real_patch.diff basic logging lunatic, 2008-05-21 16:24
works_for_me.diff (2.34 KB) works_for_me.diff lunatic, 2008-05-21 19:59

History

#1

Updated by lunatic over 11 years ago

This bug seems to be the same as #653.

#2

Updated by lunatic over 11 years ago

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

#3

Updated by stbuehler about 11 years ago

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

Fixed in r2238

Also available in: Atom