[CherryPy] #942: WSGIServer tries to set TCP options on UNIX socket

3 views
Skip to first unread message

CherryPy

unread,
Jul 16, 2009, 12:05:51 AM7/16/09
to cherrypy...@googlegroups.com
#942: WSGIServer tries to set TCP options on UNIX socket
------------------------+---------------------------------------------------
Reporter: guest | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone:
Component: wsgiserver | Keywords:
------------------------+---------------------------------------------------
WSGIServer tries to set TCP option (nodelay which is True by default since
3.1) on UNIX socket, which produces error (socket.error: (42, 'Protocol
not available')).

Attached patch fixes this issue. Tested on OpenBSD 4.6 with both 3.1.1 and
3.2.0 from trunk.

{{{
--- wsgiserver/__init__.py.orig Thu Jul 16 05:33:09 2009
+++ wsgiserver/__init__.py Thu Jul 16 05:34:34 2009
@@ -1649,6 +1649,9 @@
if isinstance(self.bind_addr, basestring):
# AF_UNIX socket

+ # AF_UNIX socket doesn't have TCP options
+ self.nodelay = False
+
# So we can reuse the socket...
try: os.unlink(self.bind_addr)
except: pass

}}}

--
Ticket URL: <http://www.cherrypy.org/ticket/942>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework

CherryPy

unread,
Aug 2, 2009, 5:13:04 PM8/2/09
to cherrypy...@googlegroups.com
#942: WSGIServer tries to set TCP options on UNIX socket
------------------------+---------------------------------------------------
Reporter: guest | Owner: fumanchu
Type: defect | Status: closed
Priority: normal | Milestone: 3.2
Component: wsgiserver | Resolution: fixed
Keywords: |
------------------------+---------------------------------------------------
Changes (by fumanchu):

* milestone: => 3.2
* resolution: => fixed
* status: new => closed

Comment:

Fixed in 3.1/3.2 in [2482].
Reply all
Reply to author
Forward
0 new messages