Package M2Crypto :: Module httpslib :: Class ProxyHTTPSConnection
[frames] | no frames]

Class ProxyHTTPSConnection




An HTTPS Connection that uses a proxy and the CONNECT request.

When the connection is initiated, CONNECT is first sent to the proxy (along with authorization headers, if supplied). If successful, an SSL connection will be established over the socket through the proxy and to the target host.

Finally, the actual request is sent over the SSL connection tunneling through the proxy.

Nested Classes

Inherited from httplib.HTTPConnection: response_class

Instance Methods
 
__init__(self, host, port=None, strict=None, username=None, password=None, **ssl)
Create the ProxyHTTPSConnection object.
 
putrequest(self, method, url, skip_host=0, skip_accept_encoding=0)
Send a request to the server.
 
putheader(self, header, value)
Send a request header line to the server.
 
endheaders(self)
Indicate that the last header line has been sent to the server.
 
connect(self)
Connect to the host and port specified in __init__.

Inherited from HTTPSConnection: close, get_session, set_session

Inherited from httplib.HTTPConnection: getresponse, request, send, set_debuglevel

Class Variables

Inherited from HTTPSConnection: default_port

Inherited from httplib.HTTPConnection: auto_open, debuglevel, strict

Method Details

__init__(self, host, port=None, strict=None, username=None, password=None, **ssl)
(Constructor)

 

Create the ProxyHTTPSConnection object.

host and port are the hostname and port number of the proxy server.

Overrides: httplib.HTTPConnection.__init__

putrequest(self, method, url, skip_host=0, skip_accept_encoding=0)

 
Send a request to the server.

`method' specifies an HTTP request method, e.g. 'GET'.
`url' specifies the object being requested, e.g. '/index.html'.
`skip_host' if True does not add automatically a 'Host:' header
`skip_accept_encoding' if True does not add automatically an
   'Accept-Encoding:' header

Overrides: httplib.HTTPConnection.putrequest
(inherited documentation)

putheader(self, header, value)

 

Send a request header line to the server.

For example: h.putheader('Accept', 'text/html')

Overrides: httplib.HTTPConnection.putheader
(inherited documentation)

endheaders(self)

 

Indicate that the last header line has been sent to the server.

Overrides: httplib.HTTPConnection.endheaders
(inherited documentation)

connect(self)

 

Connect to the host and port specified in __init__.

Overrides: httplib.HTTPConnection.connect
(inherited documentation)