{req => socket}.closeCallback?

I wouldn't be against changing from httpd.py to a simple node webserver if you want to write tests.