-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Support AF_UNIX in server.HTTPServer.bind_addr #80
Conversation
Thanks for pointing this out! It might need a regression test to prevent it from breaking during further refactoring. |
@wrmsr do you directly use |
Codecov Report
@@ Coverage Diff @@
## master #80 +/- ##
==========================================
+ Coverage 65.5% 66.26% +0.76%
==========================================
Files 15 16 +1
Lines 2780 2855 +75
==========================================
+ Hits 1821 1892 +71
- Misses 959 963 +4 |
d0763f6
to
16b5144
Compare
PR #80 by @wrmsr Fixes regression introduced by 81abec0 Socket can be bound to: * AF_INET - (host, port) tuple * AF_INET6 - (host, port, flowinfo, scopeid) tuple * AF_UNIX - socket_path_in_fs str or smth starting with null-byte for abstract sockets available under GNU/Linux Ref: https://docs.python.org/3/library/socket.html#socket-families
Thank you @wrmsr! This code should reach PYPI as soon as this build is complete: https://travis-ci.org/cherrypy/cheroot/builds/363434136 It should become available at https://pypi.org/project/Cheroot/6.1.1/ in about 30 min from now. |
Looks like this PR broke Windows build: https://ci.appveyor.com/project/CherryPy/cheroot/build/291 /cc: @jaraco |
Ref: #81 |
This hotfix breaks AF_UNIX binding by leaving only the first two characters of the socket path in bind_addr (as getsockname returns the socket file path in AF_UNIX). I caught this as my code then goes on to chmod bind_addr expecting it to be a correct path after binding.
This is imo a more urgent fix than the TODO of refactoring out the hack as the hack renders valid usecases broken in 6.1.0 without monkeypatching or equivalent.