On Tue, Aug 15, 2006 at 10:21:41AM -0600, Neil Schemenauer wrote: > On Tue, Aug 15, 2006 at 03:19:21PM +0200, Damjan wrote: > > Does this mean that we now might see the support for UNIX domain sockets > > added? > > I have no use for it but if someone else implements and maintains it > then I have no objections. Well, it's reported to be much faster, and it's easier to control who can connect to your SCGI server, by seting unix file permissions. The patch for scgi.py is simple, and lighttpd already supports it. --- scgi_server.py~ 2006-08-15 20:06:18.000000000 +0200 +++ scgi_server.py 2006-08-15 20:07:32.000000000 +0200 @@ -95,7 +95,7 @@ DEFAULT_PORT = 4000 def __init__(self, handler_class=SCGIHandler, host="", port=DEFAULT_PORT, - max_children=5): + unix_socket="", max_children=5): self.handler_class = handler_class self.host = host self.port = port @@ -244,9 +244,13 @@ timeout = 2 def get_listening_socket(self): - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - s.bind((self.host, self.port)) + if self.unix_socket: + s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + s.bind(unix_socket) + else: + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + s.bind((self.host, self.port)) return s def serve_on_socket(self, s): -- damjan | дамјан This is my jabber ID --> damjan@bagra.net.mk -- not my mail address, it's a Jabber ID --^ :)