Example #1
0
 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
Example #2
0
    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
Example #3
0
 def __init__(self, unix_socket_url, timeout=60):
     HTTPConnection.__init__(self, HOST, timeout=timeout)
     self.unix_socket_url = unix_socket_url
     self.timeout = timeout
Example #4
0
 def send(self, data):
     # print 'send:[%s]' % data
     HTTPConnection.send(self, data)
Example #5
0
 def request(self, method, url, body=None, headers={}):
     headers['Host'] = 'unix.socket'
     HTTPConnection.request(self, method, url, body, headers)
Example #6
0
 def send(self, data):
     # print 'send:[%s]' % data
     HTTPConnection.send(self, data)
Example #7
0
 def request(self, method, url, body=None, headers={}):
     headers['Host'] = 'unix.socket'
     HTTPConnection.request(self, method, url, body, headers)
Example #8
0
 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)
Example #10
0
 def __init__(self, unix_socket_url, timeout=60):
     HTTPConnection.__init__(self, HOST, timeout=timeout)
     self.unix_socket_url = unix_socket_url
     self.timeout = timeout