def __init__(self, unix_socket_url, timeout=60): """Create an HTTP connection to a unix domain socket :param unix_socket_url: A URL with a scheme of 'http+unix' and the netloc is a percent-encoded path to a unix domain socket. E.g.: 'http+unix://%2Ftmp%2Fprofilesvc.sock/status/pid' """ HTTPConnection.__init__(self, 'localhost', timeout=timeout) self.unix_socket_url = unix_socket_url self.timeout = timeout
def __init__(self, unix_socket_url, timeout=60): HTTPConnection.__init__(self, HOST, timeout=timeout) self.unix_socket_url = unix_socket_url self.timeout = timeout
def send(self, data): # print 'send:[%s]' % data HTTPConnection.send(self, data)
def request(self, method, url, body=None, headers={}): headers['Host'] = 'unix.socket' HTTPConnection.request(self, method, url, body, headers)
def __init__(self, *args, **kwargs): self._validator = kwargs.pop("validator") HTTPConnection.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): if 'strict' in kwargs and sys.version_info > (3, 0): kwargs.pop('strict') WSGI_HTTPConnection.__init__(self, *args, **kwargs) HTTPConnection.__init__(self, *args, **kwargs)