HTTPDISETConnection

class DIRAC.Core.DISET.HTTPDISETConnection.HTTPDISETConnection(*args, **kwargs)

Bases: httplib.HTTPConnection

__init__(*args, **kwargs)
auto_open = 1
close()

Close the connection to the HTTP server.

connect()
debuglevel = 0
default_port = 80
endheaders(message_body=None)

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

This method sends the request to the server. The optional message_body argument can be used to pass a message body associated with the request. The message body will be sent in the same packet as the message headers if it is string, otherwise it is sent as a separate packet.

getresponse(buffering=False)

Get the response from the server.

putheader(header, *values)

Send a request header line to the server.

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

putrequest(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
request(method, url, body=None, headers={})

Send a complete request to the server.

response_class

alias of HTTPDISETResponse

send(data)

Send `data’ to the server.

set_debuglevel(level)
set_tunnel(host, port=None, headers=None)

Set up host and port for HTTP CONNECT tunnelling.

In a connection that uses HTTP Connect tunneling, the host passed to the constructor is used as proxy server that relays all communication to the endpoint passed to set_tunnel. This is done by sending a HTTP CONNECT request to the proxy server when the connection is established.

This method must be called before the HTTP connection has been established.

The headers argument should be a mapping of extra HTTP headers to send with the CONNECT request.

strict = 0
class DIRAC.Core.DISET.HTTPDISETConnection.HTTPDISETResponse(sock, *args, **kwargs)

Bases: httplib.HTTPResponse

__init__(sock, *args, **kwargs)
begin()
close()
fileno()
getheader(name, default=None)
getheaders()

Return list of (header, value) tuples.

isclosed()
read(amt=None)
class DIRAC.Core.DISET.HTTPDISETConnection.HTTPDISETSocket(gsiSocket)

Bases: object

__init__(gsiSocket)

x.__init__(…) initializes x; see help(type(x)) for signature

close()
makefile(mode, bs)
read(size)
readline(size=0)