New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyWSGI does not work with UNIX sockets #299

Closed
Eugeny opened this Issue Aug 19, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@Eugeny
Contributor

Eugeny commented Aug 19, 2013

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 390, in run
result = self._run(_self.args, *_self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 70, in handle
handler.handle()
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 180, in handle
result = self.handle_one_request()
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 311, in handle_one_request
self.environ = self.get_environ()
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 483, in get_environ
env['REMOTE_ADDR'] = self.client_address[0]
IndexError: string index out of range

client_address is obviously not available with AF_UNIX

Socket created with:

    listener = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    listener.bind(path)
    listener.listen(10)
@nathan-hoad

This comment has been minimized.

Show comment
Hide comment
@nathan-hoad

nathan-hoad Aug 21, 2013

Contributor

I assume you're running 0.13.x? This has been partially fixed in 1.0b2.

Contributor

nathan-hoad commented Aug 21, 2013

I assume you're running 0.13.x? This has been partially fixed in 1.0b2.

@denik

This comment has been minimized.

Show comment
Hide comment
@denik

denik Sep 14, 2013

Member

Fixed in 82f5033

Member

denik commented Sep 14, 2013

Fixed in 82f5033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment