A single connection from an HTTP client.
Handles a single HTTP GET or HEAD request from a client using
HTTP/1.0.
|
|
|
string
|
|
boolean
|
|
method
|
|
method
|
|
|
|
answer(self,
r,
httpreq)
Add a response to the queued responses and check if any are ready
to send. |
source code
|
|
|
|
send_answer(self,
(responsecode, responsestring, headers, data),
header,
command,
path,
encoding,
req_headers)
Send out the complete request. |
source code
|
|
|
|
close(self)
Close the connection and drop all pending requests/answers. |
source code
|
|
string
|
buf
the buffered data received on the connection
|
boolean
|
close_connection
whether the connection will be closed after this request
|
boolean
|
closed
whether the connection has been closed
|
string
|
command
the requested command ('GET' or 'HEAD')
|
|
SocketHandler.SingleSocket
|
connection
the new connection that was created
|
boolean
|
done
whether the response has been sent
|
boolean
|
donereading
whether the headers have been read
|
string
|
encoding
the encoding to use when sending the response
|
|
HTTPHandler
|
handler
the handler for all incoming HTTP connections
|
string
|
header
the first header line received from the request
|
dictionary
|
headers
the headers received with the request
|
method
|
next_func
the next method to call to process data on this connection
|
string
|
path
the requested path to get
|
string
|
protocol
the protocol used to make the request
|
list of HTTPRequest
|
requests
the outstanding requests for paths
|
(int, int)
|
version
the protocol version of the request
|